Folder lcd contains python code for communication with LCD 16x02 display using I2C protocol. I2C is enabled using mjkdz board in order to save a lot of GPIO pins.
Python script lcd-dbus.py listens for incoming dbus messages and sends them to the LCD display.
Configuration for dbus protocol is placed in docs/dbus-configuration folder. Folder tree needs to be copied over Raspberry Pi filesystem but before that, the file com.svesoftware.raspberry.lcd.service in folder /docs/dbus-configuration/usr/share/dbus-1/system-services has to be modified to match exact path of lcd-dbus.py script.
This is required for dbus to automatically starts script when specific message is received by dbus service.
Example of file:
[D-BUS Service] Name=com.svesoftware.raspberry.lcd Exec="/home/pi/raspberry/git/lcd/lcd-dbus.py" User=root
python3 lcd-send.py or python3 lcd-time.py
It receives messages from nRF24L01P+ chip and sends them to the lcd using dbus protocol. Transmission is set to "No acknowledge" with fixed payload length in order to achieve longer distances.
make make install
make make install
make sudo ./rf24sense-dbus
Remote unit is composed of AVR, nrf24l01+ wireless module and some sensors. General idea is that unit costs as low as possible and to consume small amount of electricity. Unit is currently powered using 2 AA batteries.
Code for remote sensor component can be found here: https://github.com/dnezic/wisense-avr.
Project is suited for ATTINY861. You can also use ATTINY84 since ATTINY85 has no enough pins to communicate with DHT22 chip unless RESET pin is "fused" to be "normal" IO pin.
However, all modules within project work with all three chips, just with different settings. So for ATTINY85, please configure software to use RESET pin for communication.
You need to program fuses correctly in ATTINY85 to change function of RESET pin and to disable future programming (except of high voltage programming).
Basic idea is that AVR reads data from DHT22 chip and transmits data periodically using nRF24L01P+ chip to the central station. This idea had to be currently abandoned because DHT22 requires at least 3V in order to function normally.
Step-Up converters of decent quality with low stand-by current consumption are more expensive than other components alltogether. Currently BMP085 is used with barometric pressure sensor and not so accurate temperature sensor.
Because of that, analog temperature sensor will be added in the future - or not yet available BMP sensor with humidity sensing too.
That is the reason why ATTINY861 is used, because it has two USI ports, one is used for SPI and other for I2C communication.
Projects should be imported and built in Eclipse CDT with AVR programming support. Check if environemnt variable F_CPU is set to 1000000UL. In order to use DHT22 module, F_CPU has to be set to 8000000L, and clock divisor by 8 disabled by fuse programming.
First, read fuses to check internal clock divider settings:
avrdude -c usbasp -p t84 -U lfuse:r:-:h -U hfuse:r:-:h -U efuse:r:-:h -U lock:r:-:h -v
Calculate fuses using this website: http://www.engbedded.com/fusecalc. Divide clock by 8 internally; [CKDIV8=0] should be unchecked:
avrdude -c usbasp -p t84 -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
cd wisense/Release avrdude -p t84 -c usbasp -e -U flash:w:avr.hex