Difference between revisions of "Cutipy-MicroPython Bluetooth LE demo"
Line 13: | Line 13: | ||
'''ON YOUR PC:''' | '''ON YOUR PC:''' | ||
<cl> | <cl> | ||
− | 1. Connect your CutiPy to your personal computer (Steps covered here) | + | 1. Connect your CutiPy to your personal computer using a microUSB cable (Steps covered here) |
* Copy blechat.py into the CutiPy drive | * Copy blechat.py into the CutiPy drive | ||
* Reset your CutiPy board to update the file system | * Reset your CutiPy board to update the file system | ||
+ | * Establish a REPL terminal connection | ||
+ | * Enter the following commands into the REPL terminal to launch the ''CutiPy's'' bluetooth application | ||
+ | The CutiPy bluetooth connection should now be discoverable. | ||
'''ON YOUR ANDROID DEVICE:''' <br/> | '''ON YOUR ANDROID DEVICE:''' <br/> | ||
Line 22: | Line 25: | ||
* Open the app | * Open the app | ||
* Find the '''EMAC Demo''' entry. It will have the Alias ''cutipy'' | * Find the '''EMAC Demo''' entry. It will have the Alias ''cutipy'' | ||
+ | * Click '''CONNECT''' | ||
+ | * On the next screen, click the arrow next to '''Custom Service''' | ||
+ | * Clicking the ‘N’ button will toggle LED1 (Indicated by purple arrow) | ||
+ | * Clicking on the ‘W’ button (Indicated by red arrow) will bring up a text entry box that will send text to the CutiPy LCD screen | ||
+ | * The text 'clear' can be sent to the clear the LCD, 'exit' can be sent to stop the app. | ||
</cl> | </cl> |
Revision as of 15:58, 18 October 2019
Intro
Here we will demonstrate basic Bluetooth LE (low energy) connectivity between an android device and a CutiPy running MicroPython. The application will connect to the CutiPy via the onboard RS9116 radio module, once connected the user can 'wirelessly' toggle an led and send text messages to the LCD.
Required Materials
-
Android device (Smartphone)
-
CutiPy device running MicroPython
-
A personal computer
Steps
ON YOUR PC:
-
Connect your CutiPy to your personal computer using a microUSB cable (Steps covered here)
-
Copy blechat.py into the CutiPy drive
-
Reset your CutiPy board to update the file system
-
Establish a REPL terminal connection
-
Enter the following commands into the REPL terminal to launch the CutiPy's bluetooth application
The CutiPy bluetooth connection should now be discoverable.
ON YOUR ANDROID DEVICE:
-
Download the BLE Scanner App from the Google Play Store
-
Open the app
-
Find the EMAC Demo entry. It will have the Alias cutipy
-
Click CONNECT
-
On the next screen, click the arrow next to Custom Service
-
Clicking the ‘N’ button will toggle LED1 (Indicated by purple arrow)
-
Clicking on the ‘W’ button (Indicated by red arrow) will bring up a text entry box that will send text to the CutiPy LCD screen
-
The text 'clear' can be sent to the clear the LCD, 'exit' can be sent to stop the app.