1_gpio.zip2_uart.zip3_gpiote.zip4_twi.zip
Hello,
I am a research assistant at the Norwegian University of Science and Technology. We have in the past been using the micro:bit v1 for our practical labs which purpose is to introduce the students to basic C programming. For that, we have been using GCC ARM as our compiler, nrfjprog to flash compiled code to the micro:bit, and lastly JLink to communicate with the micro:bit. The latter removes the DAL by just simply drag and drop of the hex file from Segger.com.
Our problem is that for this year, we have received the second version of the micro:bit, which uses a nrf52833. I was therefore wondering if there is someone who could help me on the way to replicate the simple assignments that we have earlier created for the v1 for the new v2?
I attached the solutions for micro:bit v1 as a zip file, with the Makefile required to run it. The code runs by going into each folder, and then compile with "make", before one can flash over the compiled program with "make flash". Here is a small description on what each code does:
- 1_GPIO programs the micro:bit v1 to turn on and off the LEDs in the matrix with the A/B button.
- 2_UART programs the micro:bit v1 for two ways communication. In our lab, we use picocom.
- 3_GPIOTE programs the micro:bit v1 to define events (button B pressed), and 3 tasks (turn off and on the voltage to the three LEDs matrices)
- 4_TWI programs the micro:bit v1 to connect to the gyro so that the LED matrix can be used to describe the orientation of the micro:bit.
Ultimately, what we desire is to have something similar. Ideally a Makefile, a .build_system folder, and .c/h files.
What I have done untill now is to recreate the first assignments with GPIO, but the micro:bit does not seem to respond. I tried to install the new firmware for the micro:bit v2 for JLink but I suspect I have to modify the .build_system folder and the Makefile (I suspect one only needs to change the nrf51->nrf52 and set the cortex to 4?) accordingly.
Best wishes,
Kiet