Posted

I have tried repeatedly to get the Radio Shack arduino camera shield to work.

It refuses to work. I keep getting the long message that means my computer isn’t communicating with it. I remove the camera, the arduino and my computer talk to each other just fine.

Just avoid the Radio Shack CT-2 camera and get the arduino shield cameras for your project from http://www.adafruit.com/products/1386 instead.


Author
Categories My blink blink stuff, my comments

Posted

The instructions clearly mention the requirement for a 12 volt direct current adapter, or an eight AA battery holder. Both have to have a 5.5 millimeter barrel. No mention of the inside diameter of the barrel. Current requirement is 1 amp.

So I bought an 8 AA battery holder, with a 9-volt type snap connector on it. A package of 9 volt snap connectors with wires, and two packages, each with different inner barrel sizes, outside diameter 5.5 mm. So I’ll have to put all that together, in order to use these LEDs.

You would think they would carry what is needed to make this work. Good thing I know how to use a soldering iron.

I just checked Adafruit.com’s site. Their Digital RGB LED Weatherproof Strip 32 LED – (1m) – ID: 306 uses a 5 volt Direct current ( 5vdc) adapter and requires 2 amps for 1 meter. Their Neo Pixel strips have the same power requirements.

From the look of one, and the photo of the other, they look the same. So I’m not certain I should be pumping 12 volts to the Radio Shack rgb LED 1 meter strip.

Adafruit’s item 875 is a plug it in for 8 AA batteries, 5.5mm outside and 2.1 mm inside diameters. Cheaper than all the material to make one from Radio Shack items.

Radio Shack uses a TM1802 driver/controller integrated circuit. It allows changing color and brightness of each LED segment. After cutting, there are 3 LEDS per 10 cm strip.

Adafruit’s NeoPixels uses a WS2812 and WS2811 chip/driver. The other strips use different circuit chips. Can be cut down to one pixel.

My opinion is the adafruit.com items are better and easier to work with.


Author
Categories My blink blink stuff, LED strip

Posted

Magazine said insert the SD card into the bottom of the Raspberry Pi.

Took me a few seconds, sideways, not up into the Pi.

The bottom of Pi.

SD card partially inserted. Note the matching cut off corner on the upper right of the SD card slot.

completely inserted.

Projecting out of the Pi’s case, purchased from adafruit.com

With clear top of same case attached.

The opposite side of the Adafruit Pi case.


Author
Categories My blink blink stuff, Raspberry Pi

Posted

I got it to work…

I found the Fritzing diagram here to be much easier to follow than the overhead view that came with the kit.

Mine worked okay. I noticed the first LED mostly stayed on, so I rewrote the sketch to blink them in a difference sequence.

In the below code, when you see a underscore under a number, that is actually [number]. A location in the array.



/* ————————————————————————————- * | Arduino Experimentation Kit Example Code | * | CIRC-02 .: 8 LED Fun :. (Multiple LEDs) | * ————————————————————————————- * * A few Simple LED animations * * For more information on this circuit http://tinyurl.com/d2hrud * */

//LED Pin Variables
int ledPins[] = {2,3,4,5,6,7,8,9}; //An array to hold the pin each LED is connected to //i.e. LED #0 is connected to pin 2, LED #1, 3 and so on //to address an array use ledPins0 this would equal 2 //and ledPins7 would equal 9

/* * setup() – this function runs once when you turn your Arduino on * We the three control pins to outputs */
void setup()
{

//Set each pin connected to an LED to output mode (pulling high (on) or low (off) for(int i = 0; i < 8; i++){ //this is a loop and will repeat eight times pinMode(ledPins[i],OUTPUT); //we use this to set each LED pin to output } //the code this replaces is below /* (commented code will not run) * these are the lines replaced by the for loop above they do exactly the * same thing the one above just uses less typing pinMode(ledPins0,OUTPUT); pinMode(ledPins1,OUTPUT); pinMode(ledPins2,OUTPUT); pinMode(ledPins3,OUTPUT); pinMode(ledPins4,OUTPUT); pinMode(ledPins5,OUTPUT); pinMode(ledPins6,OUTPUT); pinMode(ledPins7,OUTPUT); (end of commented code)*/ }

/* * loop() – this function will start after setup finishes and then repeat * we call a function called oneAfterAnother(). if you would like a different behaviour * uncomment (delete the two slashes) one of the other lines */
void loop() // run over and over again
{ oneAfterAnotherNoLoop(); //this will turn on each LED one by one then turn each off //oneAfterAnotherLoop(); //does the same as oneAfterAnotherNoLoop but with //much less typing //oneOnAtATime(); //this will turn one LED on then turn the next one //on turning the //former off (one LED will look like it is scrolling //along the line //inAndOut(); //lights the two middle LEDs then moves them out then back //in again
}

/* * oneAfterAnotherNoLoop() – Will light one LED then delay for delayTime then light * the next LED until all LEDs are on it will then turn them off one after another * * this does it without using a loop which makes for a lot of typing. * oneOnAtATimeLoop() does exactly the same thing with less typing */
void oneAfterAnotherNoLoop(){ int delayTime = 100; //the time (in milliseconds) to pause between LEDs //make smaller for quicker switching and larger for slower digitalWrite(ledPins0, HIGH); //Turns on LED #0 (connected to pin 2 ) delay(delayTime); //waits delayTime milliseconds digitalWrite(ledPins2, HIGH); //Turns on LED #1 (connected to pin 3 ) delay(delayTime); //waits delayTime milliseconds digitalWrite(ledPins4, HIGH); //Turns on LED #2 (connected to pin 4 ) delay(delayTime); //waits delayTime milliseconds digitalWrite(ledPins6, HIGH); //Turns on LED #3 (connected to pin 5 ) delay(delayTime); //waits delayTime milliseconds digitalWrite(ledPins1, HIGH); //Turns on LED #4 (connected to pin 6 ) delay(delayTime); //waits delayTime milliseconds digitalWrite(ledPins3, HIGH); //Turns on LED #5 (connected to pin 7 ) delay(delayTime); //waits delayTime milliseconds digitalWrite(ledPins5, HIGH); //Turns on LED #6 (connected to pin 8 ) delay(delayTime); //waits delayTime milliseconds digitalWrite(ledPins7, HIGH); //Turns on LED #7 (connected to pin 9 ) delay(delayTime); //waits delayTime milliseconds

//Turns Each LED Off digitalWrite(ledPins1, LOW); //Turns on LED #0 (connected to pin 2 ) delay(delayTime); //waits delayTime milliseconds digitalWrite(ledPins3, LOW); //Turns on LED #1 (connected to pin 3 ) delay(delayTime); //waits delayTime milliseconds digitalWrite(ledPins5, LOW); //Turns on LED #2 (connected to pin 4 ) delay(delayTime); //waits delayTime milliseconds digitalWrite(ledPins7, LOW); //Turns on LED #3 (connected to pin 5 ) delay(delayTime); //waits delayTime milliseconds digitalWrite(ledPins0, LOW); //Turns on LED #4 (connected to pin 6 ) delay(delayTime); //waits delayTime milliseconds digitalWrite(ledPins2, LOW); //Turns on LED #5 (connected to pin 7 ) delay(delayTime); //waits delayTime milliseconds digitalWrite(ledPins4, LOW); //Turns on LED #6 (connected to pin 8 ) delay(delayTime); //waits delayTime milliseconds digitalWrite(ledPins6, LOW); //Turns on LED #7 (connected to pin 9 ) delay(delayTime); //waits delayTime milliseconds
}

/* * oneAfterAnotherLoop() – Will light one LED then delay for delayTime then light * the next LED until all LEDs are on it will then turn them off one after another * * this does it using a loop which makes for a lot less typing. * than oneOnAtATimeNoLoop() does exactly the same thing with less typing */
void oneAfterAnotherLoop(){ int delayTime = 100; //the time (in milliseconds) to pause between LEDs //make smaller for quicker switching and larger for slower

//Turn Each LED on one after another for(int i = 0; i <= 7; i++){ digitalWrite(ledPins[i], HIGH); //Turns on LED #i each time this runs i delay(delayTime); //gets one added to it so this will repeat } //8 times the first time i will = 0 the final //time i will equal 7;

//Turn Each LED off one after another for(int i = 7; i >= 0; i—){ //same as above but rather than starting at 0 and counting u //p //we start at seven and count down digitalWrite(ledPins[i], LOW); //Turns off LED #i each time this runs i delay(delayTime); //gets one subtracted from it so this will repeat } //8 times the first time i will = 7 the final //time it will equal 0
}

/* * oneOnAtATime() – Will light one LED then the next turning off all the others */
void oneOnAtATime(){ int delayTime = 100; //the time (in milliseconds) to pause between LEDs //make smaller for quicker switching and larger for slower

for(int i = 0; i <= 7; i++){ int offLED = i – 1; //Calculate which LED was turned on last time through if(i == 0) { //for i = 1 to 7 this is i minus 1 (i.e. if i = 2 we will offLED = 7; //turn on LED 2 and off LED 1) } //however if i = 0 we don’t want to turn of led -1 (doesn’t exist) //instead we turn off LED 7, (looping around) digitalWrite(ledPins[i], HIGH); //turn on LED #i digitalWrite(ledPins[offLED], LOW); //turn off the LED we turned on last time delay(delayTime); } }

/* * inAndOut() – This will turn on the two middle LEDs then the next two out * making an in and out look */
void inAndOut(){ int delayTime = 100; //the time (in milliseconds) to pause between LEDs //make smaller for quicker switching and larger for slower

//runs the LEDs out from the middle for(int i = 0; i <= 3; i++){ int offLED = i – 1; //Calculate which LED was turned on last time through if(i == 0) { //for i = 1 to 7 this is i minus 1 (i.e. if i = 2 we will offLED = 3; //turn on LED 2 and off LED 1) } //however if i = 0 we don’t want to turn of led -1 (doesn’t exist) //instead we turn off LED 7, (looping around) int onLED1 = 3 – i; //this is the first LED to go on ie. LED #3 when i = 0 and LED // //#0 when i = 3 int onLED2 = 4 + i; //this is the first LED to go on ie. LED #4 when i = 0 and LED // //#7 when i = 3 int offLED1 = 3 – offLED; //turns off the LED we turned on last time int offLED2 = 4 + offLED; //turns off the LED we turned on last time digitalWrite(ledPins[onLED1], HIGH); digitalWrite(ledPins[onLED2], HIGH); digitalWrite(ledPins[offLED1], LOW); digitalWrite(ledPins[offLED2], LOW); delay(delayTime); } //runs the LEDs into the middle for(int i = 3; i >= 0; i—){ int offLED = i + 1; //Calculate which LED was turned on last time through if(i == 3) { //for i = 1 to 7 this is i minus 1 (i.e. if i = 2 we will offLED = 0; //turn on LED 2 and off LED 1) } //however if i = 0 we don’t want to turn of led -1 (doesn’t exist) //instead we turn off LED 7, (looping around) int onLED1 = 3 – i; //this is the first LED to go on ie. LED #3 when i = 0 and LED // //#0 when i = 3 int onLED2 = 4 + i; //this is the first LED to go on ie. LED #4 when i = 0 and LED // //#7 when i = 3 int offLED1 = 3 – offLED; //turns off the LED we turned on last time int offLED2 = 4 + offLED; //turns off the LED we turned on last time digitalWrite(ledPins[onLED1], HIGH); digitalWrite(ledPins[onLED2], HIGH); digitalWrite(ledPins[offLED1], LOW); digitalWrite(ledPins[offLED2], LOW); delay(delayTime); } }

Author
Categories My blink blink stuff, arduino circuits