Tricks about Raspberry Pi #65
Labels
blog: programming
@post
This is a blog post
tag: raspi
|185748696-94767831-83ec-48fe-9bbb-5c7f89d4e9f8.png
View Post on Blog
Get the Temperature
Outputs:
And here is bash script to create temperature PS1
Adding a dot is just mixing bash substrings (
${string:offset[:length]}
) with bash string lengths (${#string}
)vcgencmd
From https://www.raspberrypi.org/documentation/raspbian/applications/vcgencmd.md
To get all commands, use:
Voltage
If voltage is okay, you will get
0x0
Else, say
0x50000
, convert it to binary, and see each bit:Generally, the 3
0
s in the middle do not have specific meaning. Just need to care about the first5
and the last0
.Screen on / off
When you start the Raspberry Pi with display / monitor / screen on, it will automatically turn on display power. If not, display power will never turn on even if you later connect it to a screen. So it is necessary to control the display power.
1
for on and0
for off. barevcgencmd display_power
shows current state.It is possible to specify a certain display ID. For more info, visit the doc above.
The text was updated successfully, but these errors were encountered: