Posts

Showing posts from 2015

Parallax Smart Card Reader - Revisited

I believe I have mentioned that at some time, I was going to implement an Arduino Library for the Parallax Smart Card Reader.   Well, that time is now. The library has support for the 3 smart cards that are also available from Parallax.   The samples are equivalent to the stand-alone samples that have been available for quite some time now.   The big difference is that using the 3 smart cards is now very similar.   You initialize the cards with an Initialize() function, you read and write data to the cards with Read() and Write() functions.   There is an Authenticate() function available for the IS23SC4442 card.   The parameters are similar for each card (but they aren't always identical ... the IS24SC16A card requires a Page parameter, where the IS24SC02A doesn't, for example).   Update :  This library now has 3 additional functions for each card:  WriteString(), ReadString() and ClearString() ... basically you can write a string at a location on a page of the memory (note,

1Sheeld Libraries for Netduino, revisited.

NOTE:  See the original post here for additional information (including version updates). I have updated the 1Sheeld Libraries and Samples for Netduinos.   Things have changed a bit and those of you creating your own sketches will need to modify your code a bit if you decide to use the latest version (but, frankly, things have gotten a lot simpler and I recommend that you upgrade and take a couple minutes to update your sketches ... for no other reason than the older libraries will no longer be upgraded). I'm going to give you a look at a simple sketch, both before and after the updates, so you can see the differences ... I'll use the SimpleLED sample for this discussion. First a look at the before  code...  Note: I've removed the using statements to simplify things (nothing has changed regardless of whether you use the old libraries or the new libraries with the using statements). Here's the Program.cs  ... it just instantiates an Led class and calls Setup(

1Sheeld on a Raspberry Pi using Alamode (or not)

Image
The previous post was about using the Arduino IDE to build and run sketches for a 1Sheeld shield with the 1Sheeld plugged directly into a pcDuino. This post describes the changes necessary to do similar ... but in this case the 1Sheeld is sitting on an AlaMode (Arduino compatible board) which, in-turn is sitting on a Raspberry Pi.   I have a Raspberry Pi 2 B ... but this should work on any version of the Raspberry Pi that the AlaMode is compatible with.   NOTE: Further investigation shows that these changes are necessary whether you use an Alamode or you simply have an Arduino plugged in to a USB Port. First off, changes necessary are similar to pcDuino ... so, I'll go through each file that needs to be changed.   NOTE : I'm going to start with the base OneSheeld Arduino libraries, the changes made for pcDuino are NOT included. Make sure you have the Arduino IDE and Alamode working on the Raspberry Pi before attempting this.   NOTE: Again, this is required even for Arduin

Using the Arduino IDE to run 1Sheeld sketches on a pcDuino

In a previous post, I provided a modified library and samples for using the 1Sheeld on a pcDuino (2 or 3) using the pcDuino Arduino-ish libraries (c_environment).   If, however, you want to compile sketches for the 1Sheeld on the pcDunio using the Arduino IDE, there are some additional things you need to do.   I've also taken pains to make sure that the changes I talk about here are integrated into the Arduino Libraries in such a way that you can still use them if you are connecting an Arduino to the pcDuino and using the 1Sheeld on the Arduino ... so, the exact same libraries can be used for Ardunio/1Sheeld sketches or pcDuino/1Sheeld sketches. <<< TERMIO ISSUES >>> You may want to add this somewhere to your start-up configuration ... or create an easily accessible script somewhere. stty -onlcr -icrnl -F /dev/ttyS1 If you don't, using some of the Shields won't work as-expected ... and if you ever need to you can always do this to

All post's source code downloads now point to Github

As of 02-16-2015 all source code (libraries, sample, sketches, etc) download links in the Arduino CodeDog blog posts that I've created have been changed and now point to public Github repositories. All future source code downloads will point to Github repositories as well.

1Sheeld's GamePad and a Gameduino and you are Good-To-Go

Image
After converting the Arduino Libraries to C# for Netduino I needed a little play time.  So, I decided to dig out my Gameduino and see what I could come up with.  It didn't take long to think "hmmm, 1Sheeld's GamePad may just work for the Frogger demo that the Gameduino folks have provided" ... and a small change to the Frogger Sketch (adding 1Sheeld Gamepad support) and voila, Frogger on an Arduino with 1Sheeld GamePad support...very, very cool! Here's the entire Controller class using the OneSheeld library GamePad support, #include the OneSheeld.h at the top of the Frogger sketch and you will be crossing the street with a frog in tow in no time. class Controller { public: void begin() { OneSheeld.begin(); prev = 0; } byte read() { byte r = 0; if (GamePad.isDownPressed()) r |= CONTROL_DOWN; if (GamePad.isUpPressed()) r |= CONTROL_UP; if (GamePad.isLeftPressed()) r |= CONTROL_LEF

MakerShield Kit, why another Prototyping Shield?

Even though I do have an Adafruit Proto Shield , which works well and I've had no problems what-so-ever with it, I decided to pick up one of the MakerShield Kits for a number of reasons. Yes, It has a Potentiometer on the board ... but that wasn't the primary reason. The Shield Headers allow you to attach shields ON TOP ... BIG reason #1  The ICSP Headers are in the correct place for Arduino Shields ... BIG reason #2 So, why is this important if you are going to use it as a Prototyping shield, you want it to be the one on top, so you can access everything... right?   Well... yes, typically.  But here are the benefits to me... I have a pcDuino with a T Board to bridge 5V Arduino shields (the pcDuino only wants 3.3V shields used, the T Board allows 5V shields without damaging the pcDuino).  It has ICSP headers, but they aren't in the standard location for Arduino shields.  The MakerShield fixes that, I can attach this to the T Board and then attach a shield that h

Netduino Library and Samples for 1Sheeld

Image
NOTE:  See the revisited post here for additional information and updates. I received a Netduino Plus 2 as a gift a little while back. I have completed converting the 1Sheeld Arduino Libraries and Sample Sketches to C# so they can be used with my Netduinos (I now own a Netduino 3 Wifi as-well). Please note: the projects / source were created with Visual Studio 2013 Professional, but are being maintained with Visual Studio 2015 Professional ( Note: the free version of Visual Studio 2015 Community works fine and will load the solution, compile and run the samples without any problems).  The projects / source also expects a recent firmware on the Netduinos with the latest.NET Micro Framework, the VS 2015 Project System, and the latest Netduino SDK. Recommendation:  Since there are multiple projects that you can deploy in the OneSheeld solution, rather than setting a sample as a Startup Project, I highly recommend that you right-click on one of the sample solutions, select debu

SolidDigi Color Image Shield Revisited

As previously mentioned, the SolidDigi Color Image Shield is very similar to the (now retired) SparkFun Color LCD Shield, but does have some differences. I had converted some of the code found around the internet that was available for the SparkFun shield so it would work on the SolidDigi shield. Now, I've decided to take a lot of that same code and make it work on the pcDuino. So, if you have a pcDuino, this shield will now have some sample code that works on the pcDuino. Below is a list of what has (and has not been converted) of those mentioned in a previous post: The Color LCD Shield Library - converted and working. The Arduino-O-scope - converted and working, The SparkFun Sample - not converted (although I did move over the Mandelbrot and RGB Image code to the SolidDigi Sample (just run the SOLID application and press the 1st and 3rd buttons simultaneously to see the demo(s) work). The SolidDigi Sample (with color tweaks) - converted and working. You can find