Hey Guys,
I’m new to electronics so please bear with me
I’m not sure if it’s me or if there is an issue with my shield shield, but I cannot get a blinking led to work using any of the digital pins (0-7, and yes I update the code when testing the pins) on the shield shield. If I plug the spark into a breadboard and connect the led to the digital pin it works without any issues. It’s like power is not routing through the digital pins on the shield shield.
If I wire the led directly to GND and 3V3 on the shield shield, it works.
The shield shield is using a 7v 2a power supply
Here is the code:
// Define the pins we're going to call pinMode on
int led = D4; // You'll need to wire an LED to this one to see it blink.
int led2 = D7; // This one is the built-in tiny one to the right of the USB jack
// This routine runs only once upon reset
void setup() {
// Initialize D0 + D7 pin as output
// It's important you do this here, inside the setup() function rather than outside it or in the loop function.
pinMode(led, OUTPUT);
pinMode(led2, OUTPUT);
}
// This routine gets called repeatedly, like once every 5-15 milliseconds.
// Spark firmware interleaves background CPU activity associated with WiFi + Cloud activity with your code.
// Make sure none of your code delays or blocks for too long (like more than 5 seconds), or weird things can happen.
void loop() {
digitalWrite(led, HIGH); // Turn ON the LED pins
digitalWrite(led2, HIGH);
delay(1000); // Wait for 1000mS = 1 second
digitalWrite(led, LOW); // Turn OFF the LED pins
digitalWrite(led2, LOW);
delay(1000); // Wait for 1 second in off mode
}
Do I have to add anything to the code do use the digital pins on the shield shield?
Have I missed something obvious?
Thanks.
Sparkacus