Difference between revisions of "MakePython nRF52840"
|Line 94:||Line 94:|
1. Add Arduino board:<br>
1. Add Arduino board:<br>
Additional Board Manager URLs:
Additional Board Manager URLs: https://www.adafruit.com/package_adafruit_index.json<br>
Revision as of 08:37, 18 April 2020
Python is one of the most widely used, simple and easy-to-learn programming languages around. CircuitPython is a lean implementation of the Python 3 programming language that has been pared down to run efficiently on microcontrollers.
MakePython nRF52840 is a powerful, generic BLE MCU module target to CircuitPython/MicroPython learners & developers. It is true “breadboard compatible”, with the very detailed pins explanation, it is easy to learn& use. The nRF52840 is ready to take advantage of the considerable performance improvements for Bluetooth Low Energy (LE) with the arrival of the Bluetooth 5 specification. Of greatest importance is the support for longer range (up to x4 compared to Bluetooth 4.x) and doubling of on-air data rate, up to 2 Mbs from 1 Mbs in Bluetooth 4.x
The MakePython nRF52840 leads out all pins of Nordic nRF52840, is programmed with CircuitPython by default, users can begin the CircuitPython developing as getting then on hand. It is also compatible with the Arduino making it easy to get started if the correct bootloader downloaded. There also the Makerfabs MakePython ESP8266, MakePython ESP32 and so on.
- Bluetooth Protocols: Bluetooth 5, IEEE 802.15.4-2006, 2.4GHz transceiver/Bluetooth mesh/Thread/Zigbee
- Bluetooth Data rates: Bluetooth 5: 2 Mbps, 1 Mbps, 500 kbps, 125 kbps/IEEE 802.15.4-2006: 250 kbps/Proprietary 2.4 GHz: 2 Mbps, 1 Mbps
- Bluetooth Current: 4.9mA peak current in TX(0 dBm)/4.8mA peak current in RX/0.4uA at 3V in OFF Mode, no RAM retention/1.3uA at 3V in ON Mode, no RAM retention, wake on RTC
- Bluetooth Sensitivity: -95dBm(in 1Mbps BLE Mode)/-103dBm(in 125Kbps BLE Mode)
- Bluetooth Frequency range: 2.405GHz-2.485GHz
- CPU: ARM Cortex-M4 32-bit processor with FPU
- CPU clock frequency: 64MHz
- Module interfaces: USB 2.0 full speed(12MHz), UART, High Speed 32Mhz SPI, 2x I2C(100kbps/250kbps/400kbps), I2S, LED PWM, GPIO, ADC, SWD
- nRF52840 Supply Voltage: 1.7V~5.5V
- On-chip Internal RAM: 256 KB
- Integrated flash: 1 MB
- Integrated crystal: 32 MHz crystal
- Integrated clock crystal: 32.768KHz crystal
- Timer: 5X 32-bit timers with counter mode
- Board Supply Power: 5V, Integrated 5V-to-3.3V LDO
- OLED: 1.3inch SSD1306/SSD1315
- Recommended operating temperature range: –40 °C ~ +85 °C
- Board size: 72mm length, 32.6mm width
- Moisture sensitivity level(MSL): Level 3
② Micro USB: USB to serial communication (Also supply power for the board)
③ RST: Reset button
④ SWD: Serial Wire Debug
1.P0.26 Connected to OLED’s SDA and P0.27 connected to OLED’s SCL in the board.
2.OLED Driver SSD1315 is the update of SSD1306, compatible with SSD1306.
3.P1.10 connect to control a LED, output low to turn the LED on, output high to turn the LED off.
4.The top side of board(OLED side) microUSB is USB 2.0 port, the bottom side of board microUSB is USB-to-UART(CP2102) port.
1. Download J-link (If you had already downloaded, skip this step)
2. Connect J-link to the board of NRF52840:
5. Download firmware: makepython_nrf52840_uf2_bootloader_5.2.0-71_s140.hex
Open the file and select the firmware you just downloaded (Powered by MicroUSB port)
8. Copy circuitpython-for-makepython-nrf52840.uf2 to the USB disk. Then the USB disk name changed to CIRCUITPY
1. Click to download the sample file: OLED-SSD1306
2. Copy all the files inside to the CIRCUITPY disk.
3. Click to replace the file in the target
4. Makepython NRF52840 screen displays different characters
5. You can program in code.py to achieve other functions
The previous steps 1 ~ 6 are the same as CircuitPython Bootloader, the bootoader file is changed to pca10056_bootloader-0.3.0_s140_6.1.1.hex
Project_1: Display animation
Plug the USB cable into the front MicroUSB port (the side with the screen)
1. Add Arduino board:
Additional Board Manager URLs: https://www.adafruit.com/package_adafruit_index.json
4. Download and open the example program ssd1306 128x64 i2c:
Project_2: bluetooth communication
We use the WS2812B RGB LED Module at:
- Sensor Connection
- 2.Connect the simple sensor to NRF52840 boards as following:
|WS2812 Pins||MakePython NRF52840 Pins|
Download and open the sample program Neopixels.ino
Mobile phone download and install a Bluefruit App: Bluefruit Connect_v3.3.1_apkpure.com.apk
This routine is to allow the two serial ports on the board to communicate.
1. Plug the USB cable into both MicroUSB ports
2. Open the Arduino installation path:
3.Replace the boards.txt file
4. 4.Open the variants in this directory and add the makerfabs_nrf52840 file
9. When you send information on one serial port, the other serial port can receive this information
You can list your questions here or contact with firstname.lastname@example.org for technology support.