bash
Tip
You might want to read this document on our documentation space, all inline links will be working there.
This firmware powers the Mois Box, based on the Arduino Yún Shield-compatible Dragino Yun Shield v2.4. Telemetry data is transmitted to a custom PHP receiver program over HTTP using the Yún HTTP Client from the Bridge Library for Yún devices. It is also stored locally on a SD card. The most recent firmware version is always available at node-yun-http.ino.
Mois Box Dragino Yun Shield v2.4- ADS1231 ADC weigh scale breakout board
- DS18B20 digital thermometer
- DHT22 (RHT03) digital humidity/temperature sensor
- TSL25911 Ambient Light Sensor aka. Adafruit TSL2591 STEMMA QT High Dynamic Range Digital Light Sensor
# Acquire source code repository
git clone https://github.com/hiveeyes/arduino
# Select this firmware
cd arduino/openhive/openhive-yun
c++
Have a look at the source code node-yun-http.ino and adapt feature flags and setting variables according to your environment.
Configure load cell calibration settings:
// Use sketches "scale-adjust-hx711.ino" or "scale-adjust-ads1231.ino" for calibration
// The raw sensor value for "0 kg"
const long loadCellZeroOffset = 38623;
// The raw sensor value for a 1 kg weight load
const long loadCellKgDivider = 11026;
Tip
Use scale-adjust-firmware
to determine those values.
bash
The build system is based on PlatformIO, which will install toolchains and build your customized firmware without efforts. All you need is a Python installation.
make build
export MCU_PORT=/dev/ttyUSB0
make upload
Tip
If you need to build for different targets, or if you want to modernize your dependencies, you may want to adjust the platformio.ini
file, to match your needs.
In order to make changes to the firmware, edit the node-yun-http.ino
file, and invoke make build
to build it again.