fafi
Nerves Linux System on a PI - best way to read the cpu-temperature
Hi,
i have a nerves image for an PI and want to modify it so the PI sends the cpu-temperature to an REST-API.
Currently I’m in the planning phase how this could work.
- According to that pi-gpu-and-arm-cpu-temperature it is possible to read out the cpu-temperature with “cat /sys/class/thermal/thermal_zone0/temp”. Is this also true for the nerves linux image?
- My current plan is to read out the file above with Elixir I/O.File every 10 seconds
Will this work? Has anyone a better idea or even better has anyone even developed something? Please let me know.
Most Liked
ConnorRigby
Nerves Core Team
also i just found this:
iex(49)> cmd("vcgencmd measure_temp")
temp=47.2'C
Which will work on any Raspberry pi device.
2
ConnorRigby
Nerves Core Team
I don’t know for sure, because I’ve never tried it, but I’ve found Elixir has a hard time reading some /sys/class* files currently. This will be fixed when Nerves supports otp 21.
For now you can just try reading that file normally and see what happens!
1
Popular in Questions
Hi guys, i’m new in the Elixir world, and i have to say, that i love it!
i’m having some problem to understand anonymous functions with ...
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set?
Thanks.
New
What is the proper way to load a module from a file in to IEX?
In the python world, doing something like this pretty standard:
from ....
New
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this:
...
New
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
Other popular topics
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
New
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar.
I p...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










