int button = D0;
void setup() {
pinMode(button,INPUT);
}
void loop() {
if(button = false) {
Spark.publish("door_open_test","true",60,PRIVATE);
}
}
So trying to test something and feeling stupid. I made the simple code above with the intent of publishing an event to my dashboard when the button is pushed. Just getting basic functionality down before expanding. First I set the if to button = true and after flashing I saw 4 true’s publish to my dashboard. So I thought I had it backwards, and set it up as show here. Except now pushing the button has no effect. I am sure what I am missing is simple but at this time I am just needing to understand what I am missing.