====== Introduction to IoT ====== ~~NOTOC~~ ===== 1. Whirlwind Tour Of IoT ===== ===== 2. Setup Development Environment ===== - Download and Install Arduino IDE from the [[https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-downloading-and-installing/|Download Page of Arduino]] and follow the official [[https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-downloading-and-installing/|Installation instructions]]. - Our board is the [[https://www.wemos.cc/en/latest/d1/d1_mini.html| WEMOS D1 Mini ]] and it is based on the **ESP8266** microcontroller from Espressif. Since the board is not produced by Arduino (company) it is not pre-installed in the Arduino IDE (software), however it is possible to install the add-on that allows us to program it using the entire Arduino ecosystem. To do so follow the instruction on the section [[https://randomnerdtutorials.com/installing-esp8266-nodemcu-arduino-ide-2-0/ |"Install ESP8266 NodeMCU Add-on in Arduino IDE 2"]] - [[https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers | How to install CH340 driver]] - [[https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers#drivers-if-you-need-them|Driver Download Section]] ===== 3. Hardware Review ===== * Dev-Kit: [[https://www.wemos.cc/en/latest/d1/d1_mini.html| WEMOS D1 Mini ]] * Microcontroller: ESP8266 12-E Chip. For more details of the microcontroller and board check the link [[https://randomnerdtutorials.com/getting-started-with-esp8266-wifi-transceiver-review/| ESP8266 hardware review]] | {{https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2019/05/ESP8266-WeMos-D1-Mini-pinout-gpio-pin.png?w=715&quality=100&strip=all&ssl=1}} | ^ Source from [[https://randomnerdtutorials.com/getting-started-with-esp8266-wifi-transceiver-review/|Random Nerd Tutorials]] ^ ===== 4. Soldering ===== Here it gets practical! You need to solder the microcontroller and some of the sensors, which you will need in the next session. {{ :latinet:unicaes:workshops:20230828_153840.jpg?400 | In Action}} ===== 5. Coding Warm-up ===== Now let's check if your Microcontroller works. Also, you will learn how to upload your first sketch. Basic Blink example: void setup() { // initialize digital pin LED_BUILTIN as an output. pinMode(LED_BUILTIN, OUTPUT); } // the loop function runs over and over again forever void loop() { digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }