Integrating LED and Button

This is a special forum devoted to educators using Adafruit and Arduino products for teaching.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
drbrunner
 
Posts: 4
Joined: Wed Dec 04, 2019 2:26 am

Integrating LED and Button

Post by drbrunner »

Hi,

I am relatively new to this area (adafruit, arduino etc).

I have completed the first few adafruit projects with my class (https://learn.adafruit.com/welcome-to-a ... o/projects) with a lot of success.

I wanted to try to integrate the first two (a button and an LED) together onto a single board. This would mean I would press a button and turn on an LED - simple - but it would via the adafruit feeds.

See code below for my "integration" of the two.

The end result is that it builds, the button works (communicates with the digital feed) but there is no communication the other way - so there is no message received from adafruit that a change has occurred on the feed and the LED does not turn on.

I suspect this might just not work because it is sending the return message at almost the same time that I am uploading the button information... but I am not sure. Any help appreciated. Thank you.

MOD EDIT: attachment containing wifi info deleted

Locked
Please be positive and constructive with your questions and comments.

Return to “For Educators”