Firmware for Sensor Node 2 (SN2) in the ELEC4740 Internet of Things design project. SN2 is responsible for environmental monitoring and actuation, and operates as a Bluetooth Low Energy (BLE) peripheral.
- Course: ELEC4740 – Internet of Things
- Platform: Particle Photon 2
- Device OS: 6.3.4
- Language: C++
SN2 communicates with other nodes using a shared BLE protocol defined in a separate protocol module.
The hardware design is documented in this repository.
In Part 1, SN2 is responsible for:
- Temperature sensing and calibration
- Sound detection and thresholding
- PWM control of a fan actuator
- Local user interface:
- Help button
- Status LEDs
- Periodic telemetry generation
- Event detection and reporting
In Part 2, SN2 will additionally:
- Communicate with a BLE control node
- Transmit telemetry and events over BLE
- Accept override commands for fan control
All BLE communication conforms to the shared protocol contract defined in:
protocol/ble_protocol.hpp
This file defines:
- UUIDs
- Packet layouts and sizes
- Scaling rules
- Event semantics
- Control behaviour
├── src/ # Application source code
├── protocol/ # Shared BLE protocol definition
│ ├── ble_protocol.hpp
│ └── README.md
├── project.properties # Particle project configuration
└── README.md # This file
This project is built using Particle Developer Tools.
Typical workflow:
- Open the project folder in VS Code
- Select the target device (Photon 2)
- Compile and flash via USB
- Monitor logs using the Particle Serial Monitor
- Hardware bring-up
- Sensor drivers
- Local UI
- PWM actuator control
- BLE advertising and characteristics
- Telemetry transmission
- Event transmission
- Control override handling
cal start
cal set r_series_ohms 100000
cal set ref_mv 3300
cal point set 1 500
cal point capture 1
cal point set 2 2500
cal point capture 2
cal point set 3 4500
cal point capture 3
cal solve
cal save
cal show
- Ryan Hicks
MIT