I am new to microPython. I need to build a converter for a USB streaming device to Bluetooth. A co-worker recommends me it will do the job. I need to get some ideas that whether it a true good option and how to it can be done?
I big question so far is :
Do I need more parts to support this USB inputing? Does the USB data stream directly come through the USB port of the board? Because it only has one USB port. But how can I program it when it is connecting to the device?
my shopping list is:
- MicroPython PyBoard v1.1
- Bluetooth Module (HC-06)
- Set Of Header Pins For PYBv1.1
- Python for Microcontrollers: Getting Started with MicroPython
Do I need more?
I will need a lot more information to be able to help you out.
What is the streaming device?
What are you streaming?
What are you connecting the bluetooth to?
As far as USB port use, you load your code onto the board via the USB, then the board saves and runs the program and the USB port is available for serial data. You will not be able to program and be connected to ‘the device’ at the same time.
Here is more background information:
This is an engineering device gets optical readings and sends data through USB to a PC com port. The data stream is just bytes in about 150KBps to PC. There will be minor control commands sending from PC to the device too. My idea of design is using bluetooth to replace the USB cord.
I understand your description. This will be the way to run when it is completed. But I find it will be very hard to try cording and debuging because of the USB port limits.
Another concern is this bluetooth HC-06 serves as a slave, is it ok for my case of use?
Thanks again for your help.
You should use the HC-05 because it can be both master and slave and costs the same amount.
The Pyboard has 6 different UART connection points other than the USB, so you will be able to use the USB just for debugging, and connect your device and bluetooth to any of the other available ports. You will need to find a way to connect your USB to the pins on one of the port on the Pyboard, but that should be easy enough. You can even use one of these:
It’s clearer now. I see this USB to TTL serial cable was designed for Raspberry Pi. I am sure it works for Pyboard too. But can you point out which pins should these lines go to?
RX (Brown), TX (Tan-like/Peach), VCC (Red), and GND (Black)
Here is the Pyboard pin map
I think you could connect the tx and rx to the tx and rx of any UART bus. And the ground to a ground on the pyboard, there is no need to connect the VCC.
I will give a try. Thanks a lot!