|
|
|
|
|
by arwhatever
1884 days ago
|
|
Am admittedly too inexperienced to properly weigh the pros and cons of various platforms, but I find the Rust support for certain embedded platforms to be compelling. https://github.com/atsamd-rs/atsamd I have at least managed to get some literal blinkenlights doing what I want on various Adafruit boards with very little effort. |
|
You'll spend an inordinate amount of time painting boxes to be the right color and design. Or drilling holes that are just the right size. Or deciding on acrylic cases vs wood cases vs altoid containers. Or the pros/cons of 1.5" standoffs vs 2" standoffs.
Once you figure out those details: you need to think of power (4xAA is my favorite), with probably an efficient buck-converter to drop the 5V down to 3.3V, and then a myriad of sensors that are in the 3.3V range... probably SPI vs I2C interface, or maybe a raw voltage reading so that you can do thing from your ADC converter directly.
Then the whole thing is cobbled together with maybe 500 to 1000 lines of code. Like seriously, code is the easy part.
Then you realize that your ADC converter is having an aliasing issue (physical: nothing related to code), so you need to build a low-pass filter. Do you wanna go with a passive inductor+capacitor approach? Or is your ADC converter at a high enough frequency that you need to go with a quad-Op-Amp and get a 8th order Butterworth filter up in there? What's the frequency of the aliased noise? Can you measure it on your oscilloscope?
-----------
I'm talking about basic "read sensor" and "blink them lights" projects. These are the things that come up in practice.
Code... sure. Reading the docs for how to run the various sensors (if I2C or SPI) may be tricky at times, but they "just work" more often than not. Physical issues (voltages, frequency, filters, and making your paint actually stick on the altoid can etc. etc.) are harder to debug.
And if I were to take a guess why your I2C "code" isn't working, I'd bet on a physical issue (ex: fanout, resistor choice, trace length, capacitance) over code issues, especially if you're using a plug and play library like Arduino's I2C or Rasp. Pi's I2C stuff.