1
TinyDuino Processors & TinyShields / Unknown problem with sketch
« on: March 17, 2021, 01:07:13 PM »
Ok, I have my board working (finally!)
I uploaded the included blink code, and it worked perfectly. So, now it's time to do my own first sketch. Here's what I have:
I'm using the Tinycircuits proto terminal blocks tinyshield (ASD2005-R-T-I):
The LED, which is attached to ground and #4, comes on immediately; it then sort of blinks (as if you had an intermittent wire -- that's the effect) - and then is on, but dimly. That's it. There's no repetitive blinking. I'm obviously missing SOMETHING, but I don't know what. I'm an expert programmer in BASIC, C, C#, PHP, and am currently learning python. The structure of the program is correct; I'm wondering if I have something connected wrong.
Also: Do I have to "clear" the memory of the board before uploading new code, or does it simply overwrite the old? Any help is appreciated. Eventually, I'm going to have nine different LED's, blinking on various schedules. What I'd like to have is this:
1. Blink on while #2 is off.
2. Blink on while #1 is off.
3. Blink on while #3 is off.
4. Blink on while #4 is off.
5. Random sequence with #5, #6, & #7.
6. Random sequence with #5, #6, & #7.
7. Random sequence with #5, #6, & #7.
8. Ramp up/down (different timing from #9)
9. Ramp up/down (different timing from #8)
Any help is greatly appreciated!
I uploaded the included blink code, and it worked perfectly. So, now it's time to do my own first sketch. Here's what I have:
Code: [Select]
//Pin Number Assignments:
const int LED1 = 4;
void setup()
{
pinMode(LED1, OUTPUT);
}
void loop()
{
digitalWrite(LED1, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED1, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
I'm using the Tinycircuits proto terminal blocks tinyshield (ASD2005-R-T-I):
The LED, which is attached to ground and #4, comes on immediately; it then sort of blinks (as if you had an intermittent wire -- that's the effect) - and then is on, but dimly. That's it. There's no repetitive blinking. I'm obviously missing SOMETHING, but I don't know what. I'm an expert programmer in BASIC, C, C#, PHP, and am currently learning python. The structure of the program is correct; I'm wondering if I have something connected wrong.
Also: Do I have to "clear" the memory of the board before uploading new code, or does it simply overwrite the old? Any help is appreciated. Eventually, I'm going to have nine different LED's, blinking on various schedules. What I'd like to have is this:
1. Blink on while #2 is off.
2. Blink on while #1 is off.
3. Blink on while #3 is off.
4. Blink on while #4 is off.
5. Random sequence with #5, #6, & #7.
6. Random sequence with #5, #6, & #7.
7. Random sequence with #5, #6, & #7.
8. Ramp up/down (different timing from #9)
9. Ramp up/down (different timing from #8)
Any help is greatly appreciated!