Beaglebone black: Difference between revisions
From Federal Burro of Information
Jump to navigationJump to search
(Created page with " GPIO and overlays http://derekmolloy.ie/gpios-on-the-beaglebone-black-using-device-tree-overlays/") |
No edit summary |
||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
;blink an led | |||
:http://yetticave.blogspot.ca/2013/05/blink-led-on-beaglebone-black-using.html | |||
http://derekmolloy.ie/gpios-on-the-beaglebone-black-using-device-tree-overlays/ | ;Software docs. | ||
: http://dominion.thruhere.net/koen/cms/beaglebone-software-docs | |||
;GPIO and overlays | |||
:http://derekmolloy.ie/gpios-on-the-beaglebone-black-using-device-tree-overlays/ | |||
;sensors: | |||
:http://yetticave.blogspot.ca/2013/06/beaglebone-18v-analog-logic.html | |||
<pre> | |||
#! usr/bin/python | |||
import time | |||
def sig_cel(sig): | |||
return (sig-500)/10 | |||
def cel_far(cel): | |||
return (cel*9.0/5.0) +32 | |||
try: | |||
while True: | |||
sig = file('/sys/devices/ocp.2/helper.14/AIN1','r').read() | |||
mV = int(sig) | |||
C_Temp = sig_cel(mV) | |||
F_Temp = cel_far(C_Temp) | |||
print 'Millivolts: %d Celsius: %.2f Farenheit: %.2f' % (mV,C_Temp,F_Temp) | |||
time.sleep(1) | |||
except KeyboardInterrupt: | |||
sig.close() | |||
</pre> | |||
Doing analog pins | |||
* http://www.gigamegablog.com/2012/01/22/beaglebone-coding-101-using-the-serial-and-analog-pins/ | |||
* http://hipstercircuits.com/reading-analog-adc-values-on-beaglebone-black/ | |||
reading the analog ports: convert to temp | |||
http://www.element14.com/community/community/knode/single-board_computers/next-gen_beaglebone/blog/2013/11/24/beaglebone-web-server--temperature-sensor | |||
doing dallas one wire: | |||
http://hipstercircuits.com/dallas-one-wire-temperature-reading-on-beaglebone-black-with-dto/ | |||
lists of resources: | |||
http://www.elinux.org/Beagleboard:BeagleBoneBlack | |||
[[Category:Computers]] |
Latest revision as of 15:27, 12 March 2021
#! usr/bin/python import time def sig_cel(sig): return (sig-500)/10 def cel_far(cel): return (cel*9.0/5.0) +32 try: while True: sig = file('/sys/devices/ocp.2/helper.14/AIN1','r').read() mV = int(sig) C_Temp = sig_cel(mV) F_Temp = cel_far(C_Temp) print 'Millivolts: %d Celsius: %.2f Farenheit: %.2f' % (mV,C_Temp,F_Temp) time.sleep(1) except KeyboardInterrupt: sig.close()
Doing analog pins
reading the analog ports: convert to temp
doing dallas one wire:
http://hipstercircuits.com/dallas-one-wire-temperature-reading-on-beaglebone-black-with-dto/
lists of resources: