As many people really loved working with the mBot for NodeBots, the examples, drivers and firmware that have been developed have been moved to a new repository so that it can continue to be developed and improved. Ongoing development will continue at MakeBlock Official NodeBots.
mBot is the easiest educational robot for kids to learn programming, Arduino and robotics.
Photo from Andrew Fisher
Note that
drivers
folder as this one is signed. This step will reboot your computergit clone git@github.com:jsconfcn/nodebots-session.git && cd nodebots-session
npm install
firmware/mbotFirmata/mbotFirmata.ino
and open it.Compile and then upload to the board.
Examples are in the examples directory. You can run using node examples/file.js
like
normal. Information about the examples is below
Use examples/motors.js
this will drive the mbot around using the arrow keys on
your keyboard. You may need to change the details of the directions depending on
how you wired up the motors.
Use examples/piezo.js
- this will make your mbot play some tunes.
Use examples/sonar.js
to detect the distance to an object. You can use this to
stop your robot from running into this.
Your mbot has a little button that you can use to trigger something maybe. Use
examples/button.js
to detect the button press and do something with it.
You can read the light level near the mbot - maybe you can make your mbot
run away from too much light or move towards more light? Use examples/light.js
There are 2 LEDs on the mbot which are RGB LEDs. These are connected in a strip
so you can use node-pixel to control them. An example is examples\leds.js
Under your mbot is a sensor which you can use to detect lines. Look at
examples\reflectance.js
to see how to get the data. You can detect lines by
getting one of the two sensors to be bright and one to be dark so it can follow
an edge.
Install using:
npm install drivers/node-hid
Run example
node examples/wifi_motors.js
MIT