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? Jørgen Holmefjord has already been of great help with setting up the environment but I have some issues with coding some of the registers. More specifically the UART module (see the zip file I attached). What I want to code is a two ways communication with the micro:bit v2 using picocom, where if I press the B button, the micro:bit sends "Button" + "B" and turn the led lights on, while when I press the A button, the micro:bit sends "Button" + "A" and turning the led lights off. Additionally, I also tried to program the micro:bit such that an external keyboard input will turn on and off the led lights depending on the state of the led lights.
My current progress which is found in the zip file manages to connect the GPIO module to the lights and the buttons. The resulting code when flashed over turns on and off the light depending on the button, but it does not seem to be able to communicate via UART. I suspect I maybe misunderstood the UART module?
Thank you so much in advance,
Best wishes,
Kiet