The software to be put on each generation of the weatherbox. Meant to be a complete replacement of the previous Apple code with the added capability of implementing the same functionality onto the other generations.
Firmware Repository:
Future Firmware Ideas
Current Build Not Working Notes
Initialization Create and initialize board struct Set-up board Initialize all of the sensors Read Node ID from EEPROM Run a Power on Self-Test Sample each sensor Write sensor values to serial monitor Check for bad sensor values Execution Heartbeat Packet Poll diagnostic data every three seconds for first thirty seconds Apply scaling factors to diagnostic data Construct heartbeat packet Transmit heartbeat packet every three seconds for first thirty seconds Write message to indicate successful transmission to serial monitor Data Packet Poll sensor and diagnostic data every thirty seconds Apply scaling factors to diagnostic and sensor data Construct data packet Transmit data packet every thirty seconds Write message to indicate successful transmission to serial monitor Command Mode Enter any character into the serial monitor to interrupt execution Enter “P” into serial monitor to run a Power on Self-Test Enter “E” to exit command mode and return to execution
Initialization (setup()): Version check Initialization of corresponding functions and variables Initial health diagnostics Execution (loop()): Check weatherbox battery health if good health: Poll data from each sensor Data manipulation (scaling, etc.) Construct packet Transmit packet Clear packet buffer if poor health: Turn off sensors and XBee Update current battery voltage While the battery voltage remains bad: Turn on XBee Send health diagnostic packet Turn off XBee Wait approx 10 minutes Check battery voltage Turn on Sensors and XBee
Q: Why use pre-made Arduino libraries for the sensors (and other hardware parts) instead of programming the I2C capabilities ourselves?
Arduino:
Git:
Xbee Profiles:
Xbee Library:
Xbee API Mode:
I2C Programming:
Function Pointers:
Apple Code:
Moving Average:
Git/GitHub Branch Name Changes:
Git/GitHub Tagging:
Tag Naming Conventions:
Error Code Naming Conventions:
Unit Testing Practices:
Spring 2024
Fall 2023
Spring 2023
Fall 2022
Spring 2022
Fall 2021
Spring 2021
Fall 2020
Spring 2020
Fall 2019
Spring 2019
Fall 2018
Spring 2018
Spring 2016
Fall 2015
Spring 2018
Fall 2016
Spring 2016
Fall 2015
Contributing authors:
Created by cobatake on 2015/12/02 03:01.