- Activity 1: Serial Communication on Arduino
- Activity 2: Serial Communication with Python and Arduino
- Activity 3: Communication with ISO/OSI Model Packet
- Activity 4: Sensor/Actuator Control via GUI (Python)
- Activity 5: Storing Sensor Data in a JSON File
- Activity 7: Making Sensor Data Available on the Web
- Activity 8: Motor Control via Web Browser
- Activity 9: Installation and Importing Programs on Raspberry Pi
- Activity 10: Sending Packets via RF24 Radio Module
- Activity 11: Controlling Motor and Sensor from Raspberry Pi
- Activity 12: Using MQTT for IoT Device Communication
- Activity 13: Using MQTT with ESP8266
- Activity 14: Controlling Sensor and Actuator with Alexa
- Activity 15: Using BLE for Environment Control
For library installation on Linux systems.
Activity Report 1: Serial Communication on Arduino.
Exploration of serial communication on Arduino.
Activity Report 2: Serial Communication with Python and Arduino.
Communication between a Python application running on Windows and a sensor (potentiometer) and an actuator (L293D motor) connected to an Arduino.
To communicate with the serial port using Python, the serial library is used, which can be installed on Windows with the following command:
py -m pip install pyserial
Official documentation for the serial library.
Activity Report 3: Communication with ISO/OSI Model Packet.
Reorganizing the message format exchanged between sensors/actuators and the Python application to work with an RF24 module, which has a payload of 32 bytes.
The struct library in Python is used to create these packets.
Official documentation for the [struct library
](https://docs.python.org/3/library/struct.html).
Activity Report 4: Sensor/Actuator Control via GUI (Python).
Controlling a sensor and actuator through a GUI using Python. Three different programs for the actuator and three for the sensor.
The GUI (Graphical User Interface) is created using the tkinter library, which can be installed for most users with the following command:
py -m pip install tkinter
Official documentation for the tkinter library.
In the latest version of the sensor program, the matplotlib library is used to create a graph. It can be installed (on Windows) with the following command:
py -m pip install matplotlib
Official documentation for the matplotlib library.
Activity Report 5: Storing Sensor Data in a JSON File.
Storing sensor data received in a JSON file for later use in client/server data exchange.
To write to a JSON file from Python, the json library, which is already available in Python, is used.
Official documentation for the json library.
Activity Report 7: Making Sensor Data Available on the Web.
Making sensor data stored in a JSON file available on the web using Flask and tunneling.
To create the web server, the Flask library is used, which can be installed (on Windows) with the following command:
py -m pip install Flask
Official documentation for the Flask library.
Activity Report 8: Motor Control via Web Browser.
Sending data from a web browser to a Flask application to control the motor.
Installation and program importation on Raspberry Pi.
Activity Report 10: Sending Packets via RF24 Radio Module.
How to send packets created in the "Layer 3 Packet - Serial" phase using the nRF24L01+ radio module.
To use the nRF24L01+ radio module, you need to import the RF24 library on Arduino.
Official documentation for the RF24 library. RF24 GitHub.
Activity Report 11: Motor and Sensor Control from Raspberry Pi.
How to display sensor data and control the motor through a Flask server running on Raspberry Pi, which communicates with the two Arduinos using the nRF24L01+ radio module.
To control the GPIO pins on Raspberry Pi, you need to install the pigpiod library using the following command:
sudo apt-get install pigpiod
To interface with the RF24 radio module from Python, you need to import the nrf24 library using the following command:
python3 -m pip install nrf24
Activity Report 12: Using MQTT for IoT Device Communication.
How to use the MQTT protocol to communicate between IoT devices, including through apps.
To use MQTT with Python, you need to import the paho-mqtt library using the following command:
python3 -m pip install paho-mqtt
Activity Report 13: Using MQTT with ESP8266.
How to use MQTT for message exchange between IoT devices directly connected to ESP8266 with WiFi connectivity.
You will need to add the board manager to the Arduino IDE to manage the ESP8266.
TODO: How to control the sensor and actuator using Alexa.
Activity Report 15: Using BLE for Environment Control.
How to use ESP32 to create devices that utilize the Bluetooth Low Energy (BLE) protocol for communication.
To control the ESP32 from the Arduino IDE, you will need to add the board manager as previously done for the ESP8266.