This is an old revision of the document!
Table of Contents
Laboratory scenarios
All teams share the same scenario yet please note that in particular, MQTT messages exchanged between devices shall be coordinated among team members not to overlay one another.
Scenario 1
Getting ready with your development environment
In this scenario, you will write your first “Hello World” application for ESP8266.
Using the selected IDE, write code that:
- Flashes built-in LED every 1 second (1s on; 1s off);
- Sends a message via serial port to the serial port monitor:
Hello World
...
#define LED_BUILTIN 14
...
The standard serial port speed is 9600 (bps). Connect COM port monitor (a plug icon in the PlatformIO toolbar), once you compile and upload your code, to see the “Hello World” message.
... Serial.begin(9600); ...
Advanced:
- Use timer/interrupt to flash the LED instead of an infinite loop.
Report:
- Describe your approach and include source code in the report
Scenario 2
** Using LCD **
In this scenario, you will write an application that writes on the LCD Display.
Your code shall implement a message Hello IoT in the upper line, and a counter ticking every second in the lower one.
Report:
- Present algorithm.
- Include source code.
Scenario 3
** Using Keypad **
Extend Scenario 2 with a counter that increments on the keypress of the Keypad Shield (any but SELECT!).
Report:
- Describe how did you solve the problem of the asynchronous processing of the keypresses/releases.
- Include source code.
