jsconfcn / nodebots-session

The code for nodebots session for 2015 Shen JS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to connect mbot through bluetooth

xeodou opened this issue · comments

Hi @ajfisher How can i connect the bot through bluetooth, I try several ways to connect bluetooth, but it never works. So how can i do ?

Ok. Some of this may be different based on your operating system but
basically this is the process:

  1. Pair your Bluetooth module between computer and the module. It should do
    this automatically but you may need a code (I think it is 0000 or 1234).
  2. In the mbot firmata ino file change the line that says Firmata (57600)
    to Firmata (115200).
  3. Unplug the module then upload the new firmware to the mbot. Once
    complete, plug the module back in and remove the USB cable
  4. Try to connect to the Bluetooth module over a serial connection from the
    computer. You can do this using:
screen /dev/ttyDev

Where /dev/ttyDev is whatever device the Bluetooth serial port appears on
your machine as.

In OSX or Linux you can use screen. On windows use hyper terminal. Or use
your own serial terminal of preference.

4b. Once connected you should get an empty screen. Press the reset button
(not power switch!) and you should get some characters and a file name
print out.

If you don't get this working, this won't work further.

4c. Quit your terminal console.

  1. From your node script you should now be able to pass in the device (as
    you provided above) as a parameter and it should connect and work.

On Tue, Aug 11, 2015, 18:02 xeodou notifications@github.com wrote:

Hi @ajfisher https://github.com/ajfisher How can i connect the bot
through bluetooth, I try several ways to connect bluetooth, but it never
works. So how can i do ?


Reply to this email directly or view it on GitHub
#6.

Thanks @ajfisher , it works great.

But i got another issue when i try to connect the sonar sensor, it never works, even i run the example in the repo i got the same result.

inches:  0
cm:  0
(node) warning: possible EventEmitter memory leak detected. 11 ping-read-11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at addListener (events.js:179:15)
    at once (events.js:204:8)
    at Board.pingRead (/Users/xeodou/work/nodebots-session/node_modules/johnny-five/node_modules/firmata/lib/firmata.js:1334:8)
    at Proximity.<anonymous> (/Users/xeodou/work/nodebots-session/node_modules/johnny-five/lib/proximity.js:175:19)
    at wrapper [as _onTimeout] (timers.js:265:14)
    at Timer.listOnTimeout (timers.js:110:15)
inches:  0
cm:  0
inches:  0

Make sure the sensor is plugged into the port that is defined in the
example file. This looks like it's sending pulse messages and not getting a
response.

FYI - latest docs and firmware have moved to here:
https://github.com/Makeblock-official/mbot_nodebots

On Wed, Aug 12, 2015 at 6:16 PM xeodou notifications@github.com wrote:

Thanks @ajfisher https://github.com/ajfisher , it works great.

But i got another issue when i try to connect the sonar sensor, it never
works, even i run the example in the repo i got the same result.

inches: 0
cm: 0
(node) warning: possible EventEmitter memory leak detected. 11 ping-read-11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at addListener (events.js:179:15)
at once (events.js:204:8)
at Board.pingRead (/Users/xeodou/work/nodebots-session/node_modules/johnny-five/node_modules/firmata/lib/firmata.js:1334:8)
at Proximity. (/Users/xeodou/work/nodebots-session/node_modules/johnny-five/lib/proximity.js:175:19)
at wrapper as _onTimeout
at Timer.listOnTimeout (timers.js:110:15)
inches: 0
cm: 0
inches: 0


Reply to this email directly or view it on GitHub
#6 (comment)
.

Ok Thanks. I will create a ticket at https://github.com/Makeblock-official/mbot_nodebots and close this one.

MakeBlock response (Jan 2017)
"Dear Lucas,
I'm Sorry that we don't have the ‘Block’ program ready for Linux users yet. Hopefully, we can provide our Linux mBlock in February, with whitch you can program mBot and our other products with Linux.
Besides, we offer another way to program mBot through Arduino IDE. If you are familiar with Arduino, you can view https://github.com/Makeblock-official/Makeblock-Libraries for solutions."

It will be available on the next months.

BT works with other devices...and I was even able to connect it throught some port,... probably it just require another try to finally work, but it didn't work...
... and if they're going to deliver the Linux version and I only have to install it, that's great...
...maybe I will make it work before that, but it's great in any case... they are working on the linux version...

English follows...
La versión preliminar para linux (todavía no es final y puede tener errores) ya está disponible en http://www.mblock.cc/download/ en el enlace "Linux Early Preview".
La versión a día de hoy es 0205. Podéis descargarla aquí:
https://github.com/Makeblock-official/mBlock/releases/tag/V4.0.0-linux-ep1
En mi Ubuntu 16.04 funciona, aunque en el Lubuntu de mi hijo no (de momento).
Primero te conectas con bluetooth, lo enlazas al puerto serie. Luego, ya en el programa, puedes conectarlo por el puerto serie. Es probable que cueste un poco (permisos,...), pero tras intentarlo un poco, acaba funcionando.
Está en japones: para pasarlo a español, penúltimo menú, lo ponéis en inglés y de ahí a Español.
Que lo disfrutéis mucho

Linux preview version is already available at http://www.mblock.cc/download/
Intro http://www.mblock.cc/posts/linux-early-preview
Installation: https://github.com/Makeblock-official/mBlock/releases/tag/V4.0.0-linux-ep1
It's in Japanese (to change it to English, select the next to last menu, english)
To use the bluetooth connection: connect to the bluetooth first (blueman), connect the mbot to the serial port, then, open the application and use the serial port. It's not easy, but it will finally work
Enjoy

Great chat but I wonder what the solution could be if your Mainboard is not responding after you restart it or put a new battery in it.How would you solve that problem?