When the Raspberry Pi wants to measure temperature, humidity and light level:
…but is it possible to simplify something ? ? ? Like this:
Lets use Bluettoth Low Energy technology. Lets make things simpler and wireless:
- What will we need?
- Raspberry Pi zero W or Raspberry Pi 3 (both have Bluetooth Low Energy chip onboard) with the operating system installed. Want to know how to instal OS easy? Go: Quick system installation on Raspberry Pi
- BBMagic METEO
- CR2032 battery with holder
- 10k photoresistor
- And a tasty little cookie 🙂
- Lets prepare hardware and software
- Solder battery holder and photoresistor, install CR2032 battery and the hardware is ready.
- Download bbm_logger_1.0 software from Download section. In text mode simply write:
wget http://bbmagic.net/download/bin/bbm_logger_1.0
- Change bbm_logger_1.0 file permissions:
chmod 755 bbm_logger_1.0
- To get more info about soft type:
./bbm_logger_1.0 h
- Congratulation !! Work almost done !! Eat your cookie 🙂
- Lets launch bbm_logger
- If launched: sudo ./bbm_logger_1.0 – it will only display received data
- If launched: sudo ./bbm_logger_1.0 f – received data will be log to files too
- If launched: sudo ./bbm_logger_1.0 l26 – it will switch on LED indication on pin 26 of Raspberry Pi. LED will blink during Bluetooth transmission
- Log file names from BBMagic METEO
- CBFD786BAA68 – BBMagic module address
- 18-01-03 – log starting date: year, month, day
- 133259 – log starting time: hour, minute, second
- Processing data
- day of the week – from Raspberry Pi settings
- date – from Raspberry Pi settings
- time – from Raspberry Pi settings
- temperature in Celsius – received from BBMagic METEO
- relative humidity in %RH – received from BBMagic METEO
- light level from 0 to 255 – received from BBMagic METEO
- ADC1 input voltage in Volts – received from BBMagic METEO
- ADC2 input voltage in Volts – received from BBMagic METEO
- digital inputs state – hex four bits – received from BBMagic METEO
- BBMagic METEO power supply in Volts – received from BBMagic METEO
- Bluetooth Radio Signal Strength Indicator in dBm – from Raspberry Pi
- BBMagic METEO work time from power up in seconds – received from BBMagic METEO
- Drawing the charts
It is possible to use both ‘f’ and ‘lxx’ flags.
To exit bbm_logger press ‘ctrl+c’.
- Example file name is: ‘bbmeteo_CBFD786BAA68_18-01-03_133259.txt’
- Data in log files are separate with commas. From left we have: