I'm looking to get back into programming after a few years away from it. I last studied programming in high school, and now at 22, I want to integrate it with my engineering goals. Can someone guide me on how to approach programming for microcontrollers? Specifically, how do I code the microcontroller to operate a sensor or a solar panel? What kind of code would tell the microcontroller about its connected devices and their functions?
2 Answers
Definitely read the documentation for your specific microcontroller. Since you're working with sensors, I assume it's part of a kit. Familiarizing yourself with the kit's documentation will be crucial to understanding how to set things up.
Getting started really depends on the type of microcontroller you're using. For Arduino and similar microcontrollers, you'll want to learn C/C++, which is the main programming language used. If you're into something like a Raspberry Pi, Python is another great choice. For more insights, check out some dedicated subforums like Arduino or embedded systems - they'll have a wealth of information!

I'm not entirely sure where to find the documentation. I have this kit for the Raspberry Pi Pico W and installed MicroPython on it. The project example includes a line like 'from machine import I2C, Pin', so I think it's referencing some files I downloaded, but I could use more clarity on how it all connects.