Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Request to add sensor and device readings #30

Closed
HBrydon opened this issue Jan 24, 2013 · 2 comments
Closed

Request to add sensor and device readings #30

HBrydon opened this issue Jan 24, 2013 · 2 comments
Assignees
Milestone

Comments

@HBrydon
Copy link

HBrydon commented Jan 24, 2013

I understand that your code is mostly GPIO/I2C/SPI/serial centric, but in the true spirit of the name "Pi4J", I would like to request that you provide several other things for consumption by Java programs. As a partial list, I suggest the following:
(1) API that tells the software what model and version we have (eg. Model A, B, B1, B2 etc.) You have some of the low level items but leave it up to the user/programmer on how to interpret the details. Guide to this info at http://www.adafruit.com/blog/2013/02/08/automatic-raspberry-pi-board-revision-detection-model-a-b1-and-b2-piday-raspberrypi-raspberry_pi/
(2) API to determine memory size
(3) measurement of onboard temp sensor. [I plan to use this in one of my projects to determine when to turn on an enclosure fan.] There are 2 interfaces that I am aware of:
http://www.raspberrypi.org/phpBB3/viewtopic.php?p=169726#p169726 (/opt/vc/bin/vcgencmd measure_temp)
http://www.raspberrypi.org/phpBB3/viewtopic.php?p=173006#p173006 (cat /sys/class/thermal/thermal_zone0/temp)
(4) The previous links also give supply voltage to the CPU (/opt/vc/bin/vcgencmd measure_volts where id=blank, core, sdram_c, sdram_i, sdram_p)
(5) OS firmware build ("/opt/vc/bin/vcgencmd version")
(6) Overclock details ("/opt/vc/bin/vcgencmd measure_clock x") described at
http://www.nielsmayer.com/bin/view/Raspberry+Pi/measure+overclock+frequency+with+vcgencmd+measure_clock
(7) Other vcgencmd commands can be found with "/opt/vc/bin/vcgencmd commands", some described at:
http://www.elinux.org/RPI_vcgencmd_usage

These aren't terribly difficult to implement. I can provide some code if you are interested or do you want all the glory?
[I hope to implement some of these details by 2012/02/18]

@savageautomate
Copy link
Member

HBrydon,

I agree some of these things would be nice additions. If you already have some of this coded up, then yes, please send it along, or feel free to submit a pull request if you implement it directly in the Pi4J code base.

Thanks, Robert

@ghost ghost assigned savageautomate Feb 24, 2013
savageautomate added a commit that referenced this issue Feb 24, 2013
frequency, CPU temperature, voltage, and board model data. implements
feature request defined in issue #30
savageautomate added a commit that referenced this issue Feb 24, 2013
@savageautomate
Copy link
Member

Implemented in 0.0.5-SNAPSHOT (2013-02-23 and later)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants