• Enter email to sit in the first row

Compiling app and testing BBMagic MAGNETO

Are you interested in checking how BBMagic MAGNETO works with Raspberry Pi zero W? Lets go!

Hardware preparation

To get our task done we need:

  • BBMagic MAGNETO module
  • CR2032 battery with holder or another power source fo BBMagic MAGNETO
  • reed switch
  • magnet
  • Raspberry Pi zero W or Raspberry Pi 3 – I have my Pi zero W little one. Want to know how to install OS easy? Learn it here: Quick system installation on Raspberry Pi

BBMagic MAGNETO parts

Setting BBMagic MAGNETO working mode

Lets set working mode to 1 – ‘ALIVE’ message will be sending every 30 seconds. More about ‘ALIVE’ message and other module parameters here: BBMagic MAGNETO where wires dont go

  • turn off the power of the module
  • push configuration button
  • turn on BBMagic MAGNETO power holding the button pressed
  • release the button after one LED flash
  • LED turns off for about 2 seconds and then flashes once

Installing gcc compiler

To install gcc log in to the system and type:sudo apt-get install gcc
gcc Raspberry Pi install

Software preparation

Get ‘bbmagic_magneto_sketch’ project from Download page and in terminal mode just write: wget http://bbmagic.net/download/src/bbmagic_magneto_sketch.tar.gz
bbmagic_magneto_sketch download
Unpack project file tar.gz:tar -zxvf bbmagic_magneto_sketch.tar.gz and go to the project folder:cd bbmagic_magneto_sketch
bbmagic_magneto_sketch unpacking
Compile the project with command:make
bbmagic_magneto_sketch compiling
Make sure executable file has proper permissions and if not change them:chmod 755 bbmagic_magneto_sketch

Launch application

And here comes the magic moment. Type command:sudo ./bbmagic_magneto_sketch
bbmagic_magneto_sketch running
If there is no change in magnetic field presence then BBMagic MAGNETO sends ‘ALIVE’ message every 30 seconds (working mode number one).
bbmagic_magneto_sketch no field
BBMagic MAGNETO and magnet
If the magnetic field apears… then BBMagic MAGNETO sends information about it immediately.
bbmagic_magneto_sketch magnetic field
Connecting IN_0 input to the ground…
…causes IO_state flags change.
bbmagic_magneto_sketch IN_0-LO
Lets test ADC inputs: I have connected ADC_1 input to the GND (pin 8) and ADC_2 input to external 1V DC voltage. Result:
bbmagic_magneto_sketch adc
And at the end lets check minimal power supply voltage. BBMagic MAGNETO is connected to the regulated voltage power supply:
bbmagic_magneto_sketch minimal supply voltage
Works fine. Excellent !!

Tagged , , , , . Bookmark the permalink.

Comments are closed.