Posts

Showing posts with the label WEMOS D1

Wemos D1 Night Light

Objectives: Build a circuit and program that responds to the environment. Parts Wemos D1 https://amzn.to/2yYBbMY Photo Resistor 10K Resistor Directions Clone https://githubcom/awoehler/electronics.network Open Examples/NightLight/NightLight.ino Connect the 3.3+V to the photo resistor. Connect the photo resistor to a 10k Ohm and connect it to GND. Connect the line between the photo resistor and the 10k resistor to the A0 on the Wemos board. Compile and upload the sketch to the board.  Exercises Adjust the threshold values to work better for your environment. Change it so that as it gets darker the light get's brighter. Add a brighter light.

Wemos D1 Push Button

Objectives: Build a circuit and program that allow you to control when a light turns on and off. Parts Wemos D1  https://amzn.to/2yYBbMY  Switch Directions Clone https://githubcom/awoehler/electronics.network Open Examples/ButtonLight/ButtonLight.ino Connect one side of a button to D3 and the other side to GND. Since D3 and D4 have built in resistors we don't need to add any other items to make this circuit work. Compile and upload the sketch to the board.  Exercises Change the program so that the button toggles the light on and off.

Wemos D1 Blink

Blink is a simple program to get you started with our ESP8266 and the Arduino IDE. Objectives: Learn how to interact with the built in LED. Learn how to use the serial monitor. Parts Wemos D1  https://amzn.to/2yYBbMY Directions Clone https://githubcom/awoehler/electronics.network  Open Examples/Blink/Blink.ino Compile and upload the sketch to the board. Open then Serial Monitor and make sure that the board rate is set to 115200. Press the reset button on the Wemos and you should see Begin followed by off, on, off, on, ..... in the serial monitor. Exercises: Add comments explaining what each line of code does.  Change the blink pattern to transmit an SOS signal in morse code. 

Getting Started with your Wemos D1

The easiest way to get started is to clone  https://github.com/awoehler/electronics.network  and the open up the examples and work through the problems. Download the latest version of the Arduino IDE from  https://www.arduino.cc/en/main/software Add https://arduino.esp8266.com/stable/package_esp8266com_index.json,https://dl.espressif.com/dl/package_esp32_index.json to your Additional board manager in preferences. Go to Tools -> Boards -> Board Manager Type wemos in the search bar and press search. Find the esp8266 by ESP8266 Community and install it. Connect your Wemos D1 USB port to your computer. From the Tools -> Board menu select LOLIN (WEMOS) D1 R2 & Mini option. Next make sure to tell the Arduino IDE which serial port the Wemos is connected to by using the Tools -> Ports option. Now you are ready to get started with the Wemos D1 Series Parts: Wemos D1  https://amzn.to/2yYBbMY