BrainPower Intro
The BrainPower pack is handy for taking our BrainPad Pulse and wearing it to show off what we’ve created. The power pack contains a rechargeable battery, an on-board buzzer, and a vibration motor.
Prerequisite
This assumes you’ve already assembled your BrainPower pack and are ready to learn more about it.
Vibrator
Controlling the vibrator is done through Digital or Analog. The linked lessons have all the details, but here is everything you need to know.
The Vibrator can be controlled using a Digital pin. Setting the pin to 1 will enable the vibrator and 0 will turn it off. Let’s turn it on (activate it) for one second.
DWrite(1,1)
Wait(1000)
DWrite(1,0)
It is also possible to activate the vibrator at less than full power, like at 50% power.
AWrite(1, 500)
Wait(1000)
Out(pin,0)
Buzzer
The buzzer is a passive element that is connected to a pin 2. The internal Beep() function can be used to generate tones. Let’s generate notes CDEF for one second each. If you search the web, these correspond to these frequencies: 523, 587, 659, 698. Setting the frequency to 0 will stop the sound.
Beep(2, 523, 1000)
Beep(2, 587, 1000)
Beep(2, 5659, 1000)
Beep(2, 698, 1000)
What’s Next?
Let’s start coding something we can put on our BrainPad Pulse and use the BrainPower to take it with us. Now how about a countdown timer?
BrainStorm
How does BrainPower differ from a modern smartwatch? On a basic level, they are the same thing! They have a processor, a display and battery. However, a modern smart watch will have a lot more sensors and a more capable processor to drive a high resolution color screen.