petoi-camp-logo.png
Chinese
ZH
Chinese
ZH
English
EN
  • 主页

  • 论坛

  • Shop

  • 简介

  • 图鉴

  • 资源

    • Documentation Center
    • GitHub 源代码
    • 教程视频
    • NyBoard V0_1 手册
    • NyBoard V0_2 手册
    • Smartphone App
    • GitHub/CatMini
  • 社区

    • 成员
  • More

    Use tab to navigate through the menu items.
    Tomi Ade
    -1 дн.

    Trouble Uploading to Nyboard - stk500_recv(): programmer is not responding

    3
    0
    Phillip Brush
    -4 дн.

    On Definition Rule Issues

    4
    0
    Struzck
    2021年4月28日

    pyBittle, Open Source library to connect and control Bittle

    23
    5
    若要查看作用方式,請前往您的即時網站。
    • 類別
    • 所有文章
    • 我的文章
    Rongzhong Li
    2019年3月22日
    已編輯: 2020年1月18日

    Add bluetooth module for uploading sketches and communication

    在 Hardware

    Back in February I wanted to teach Nybble some tricks on the high bar. It would involve intense experimenting and debugging in the air so I'd prefer program Nybble wirelessly. I knew it's doable to connect Bluetooth UART to the serial port on NyBoard, but didn't validate it myself.

    I mainly referred to this Instructable posts, the bluetooth module is HC-05, with a push button on it. Notice HC-05 allows uploading sketches seamlessly, while HC-06 can only be used for communication.


    My soldering:

    Next follow the Intructable post to set up HC-05. Make sure you read the original post thoroughly.


    First still use the FTDI uploader as serial port to program the baudrate, chip name and password of HC-05. Note some versions of the board may require CAPITALIZED tokens, like "AT" instead of "at".

    Then plug the bluetooth module into the 1x6 socket on NyBoard, and power on. You should be able to see its name on your computer's bluetooth list. Connect and type in your password.

    Now the device is connected to the bluetooth of your computer.

    In the serial port selection of Arduino IDE, you will see the device:

    Then you can communicate with Nybble through serial monitor. The list of supported commands is attached here.

    With the serial protocol, it's very convenient to have both high and low level control with Pi or other chips. Detailed instructions for communication are in section 4.2.5 of the documentation. It works with both Arduino IDE and my serial commander in Python.

    Now Nybble can be programmed freely 360 degrees in the air!

    That's how Nybble plays on the high bar.

    And do light painting.

    Or follow voice commands if you have a voice server (either on or not mounted on Nybble)


    ----

    Chico has made an app for Nybble:

    https://github.com/codeandrobots/codeandrobots-app



    After connecting Nybble with the app through bluetooth, you will be able to do remote controlling and motion scheduling.


    I have validated it on Android phone because it supports bluetooth 2.0 with the previous HC-05 module. Any one knows how to wire some newer bluetooth module so that it can also support IOS phones?

    7 則留言
    7 則留言
    R
    Roselli Sergio
    2021年2月26日

    Volevo capire una cosa.......installando quindi pySerial posso inviare i comandi tramite python alla seriale così come si fa ora dal terminal di arduino ? E se fosse così potrei creare anche un codice python che invia comani in automatico ?


    按讚
    Gero
    2021年2月26日
    回覆

    Yes, you will have to install PySerial via pip install on your computer. Afterwards you have to implement the library with import serial in your code.


    You can take a look at this post, which is a simple implementation of the library:

    https://www.petoi.com/forum/software/make-nybble-do-random-stuff


    So you can establish the connection via serial and assign it to the object e.g. ser to read and write to the serial port. Then you can use the write method to send a command: ser.write(str.encode('kwkF'))

    This would make Nybble/Bittle walk forward.

    按讚