Quantcast
Channel: Microcontrollers, Programming and IoT
Viewing all articles
Browse latest Browse all 1271

Banging my head on a wall

$
0
0
I have designed the electronics for the ignition system for my old 49 tractor, but have come up against a brick wall with the coding for the Arduino.
It simply didn't work, and after repeatedly simplifying the code to find the problem, I found that I can never get a valid input from the pin.
Here's the code I trimmed it down to:

void setup(){
Serial.begin(9600);
pinMode(7, INPUT);
}

void(loop){
int pinState = (digitalRead, 7);
Serial.print(pinState);
delay(1000);
}

When I run it I get a row...

Banging my head on a wall

Viewing all articles
Browse latest Browse all 1271

Trending Articles