Sensorbox Development Infrastructure

Post Reply
gradimir.ljubibratic
Posts: 1
Joined: Mon Oct 28, 2019 10:58 am

Sensorbox Development Infrastructure

Post by gradimir.ljubibratic » Mon Oct 28, 2019 4:04 pm

Arduino IDE

Download Arduino IDE from this location, www.arduino.cc/en/Main/Software. Select the operating system, download the latest version and follow the installation procedure.
If needed install support for ESP32:
  1. Start Arduino IDE, open Preferences window, File->Preferences
  2. Enter dl.espressif.com/dl/package_esp32_index.json into Additional Board Manager URLs field like on Figure 6. You can add multiple URLs, separating them with commas
  3. Open Boards Manager from Tools > Board menu and install esp32 platform, enter esp32 in filter field, select eps32 package and click in install button, Figure 1
  4. Follow Tools -> Board -> and select ESP32 Dev Module board
Arduino_Preferences_Window.png
Figure 1 - Arduino Preferences Window
Arduino_Board_Manager.png
Figure 2 - Arduino Board Manager

Arduino libraries for Wemos

In order to test sensors and develop new application, for example DPS310 and TLV493D-A1B6, Arduino libraries should be downloaded from the releases of the following GitHub repositories:
  • DPS310, download TLV493D-A1B6-3DMagnetic-Sensor.zip file
  • TLV493D-A1B6, download DPS310-Pressure-Sensor.zip file
To install the sensor libraries in the Arduino IDE, it is necessary to:
  1. Select Sketch -> Include Library -> Add .ZIP Library and navigate to the downloaded ZIP files of required repositories
  2. Now it is possible to select this libraries under Sketch -> Include Library -> DPS310 and Sketch -> Include Library -> TLV493D-A1B6
For testing the functionalities there are examples that can be found by:
  1. Following File -> Examples -> DPS310
  2. Following File -> Examples -> TLV493D-A1B6
Now selected example need to be compiled and downloaded to Wemos board:
  1. To compile an example follow Sketch -> Verify/Compile
  2. Connect Wemos board with USB cable from Sensor Box
  3. After successful compilation select the port by following Tools -> Port
  4. Upload the code by following Sketch -> Upload
  5. Run the serial port monitor following Tools -> Serial Monitor. For examples port speed should be set to 9600 bps
NOTE: If using Linux OS, when uploading a sketch, after selecting your board and the serial port it is possible to get an error “Error opening serial port”. In that case it is needed to set serial port permission. Open terminal and type:
ls -l /dev/ttyACM*
The result will look like this:
crw-rw---- 1 root dialout 188, 0 5 apr 23.01 ttyACM0
Now it is needed to add the user to the group:
sudo usermod -a -G dialout <username>
where <username> is Linux username. Then it is needed to log out and log in again for this change to take effect.

Post Reply