Hi all, I'm a complete noob with Arduino but I had built myself a decent raspberry pi laptop with a raspberry pi and would like to have some of the monitoring on the upgraded version I'm putting together with the x86. The primary ones in interested in now are CPU temp and load, I currently have the pi lighting an LED to blue when the temp is approximately room temp and shifting to red as it approaches the upper safe range 86°c I think but I don't recall off the top of my head) and for load it shifts an LED from dim to bright as the load rises. The first absolute simple question (I honestly haven't looked for this part yet, but thought maybe someone would know) is whether the x86 has a sensor for CPU temp? The more complex question that I've tried to find some info about without success (it's possible that I've looked at the answer and just didn't realize what it was) is how to actually get the data from the Linux side to the Arduino side in a relatively efficient manner. My thought was to have a script on the Linux side that would run the commands to get the information and then either save it to a location available to the Arduino or push it into the Arduino somehow (I don't know how yet...). Any suggestions for execution or resources for really clear instructions would be great Thanks David
For something simple as CPU temperature indication I would stick to Linux only. The Udoo X86 CPU has an internal temperature sensor for each core. To measure the CPU with a bash script Google for it. You need the Linux distro and version in the search string, example: Ubuntu 16.04 bash CPU temp In the same bash script you can switch a gpio when the temperature reaches your threshold. You can attach a led to one of the gpio's. Keep in mind that the udoo uses 1.8V on the Unix/Braswell side. For manipulation of gpio see documentation: https://www.udoo.org/docs-x86/Hardware_&_Accessories/GPIOs.html Good luck!
That would be my first choice actually, is it possible to access pwm gpio from the Linux side? I had assumed that gpio access was restricted to the Arduino. If that's not the case that would be awesome! If love to have access to the gpio from Linux directly David
There is no pwm documented on these pins. Perhaps with a timer you can do a software emulated pwm (softpwm). I did a quick search but it only came back with raspberry pi solutions that will not work.
I thought pins 3 5, 6&9 were pwm... https://www.udoo.org/docs-x86/img/x86_pinout_arduino.png Although soft pwm would be OK as well. Can you directly access the pins from the Linux side? I had assumed that the Arduino side was the only place that has direct access to the pins, and so it would require passing information from one to the other to use information from the PC side to display something via the pins or to access sensor data from the PC side. I do have a USB gpio board from adafruit that just has to run a library with whatever commands or scripts go to the board. I haven't done much with it but seems to work OK. I guess I could hook that to the udoo if I can't work out a way I can manage to use the pins with info from the Linux side the udoo. Thanks David
Those are the arduino pins and not usable in Linux. You need the Braswell pins https://www.udoo.org/docs-x86/img/x86_pinout_braswell.png They are on the outside of the pin headers. Arduino pins are on the inside. Click on the Braswell tab in the gpio documentation page to see more info, including instructions how to use.
Oooohhhhhhh! I'd been wondering what the outside row was! I'll check that out, maybe it can run some neopixels. Thank you I think that info may have made it totally doable! David