This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.
Workshop Instructor:
- Lilly Ryan @attacus_au
This workshop is distributed under a CC BY-SA 4.0 license.
#!/usr/bin/env perl | |
my $devices = `i2cdetect -y -r 2`; | |
#print $devices; | |
my @lines = split /\n/, $devices; | |
foreach my $line ( @lines ) { | |
next if $line =~ /^\s/; # skip lines starting with whitespace | |
$line =~ s/\d\d\:\s*//; # remove 2 digit indexes | |
#print $line , "\n"; | |
my @entries = split /\s/, $line; | |
foreach my $entry ( @entries ) { |
#!/usr/bin/env python3 | |
# MIT License | |
# (c) 2017 Kevin J. Walchko | |
# | |
# Updated 16 Mar 2020: Python 3.7.5 Ubuntu 19.10 | |
# Desktop, wired interface is enp2s0 | |
# Raspberry Pi: wlan0 | |
# Ideally, this should be fixed, it is hard coded right now |
ravi@ravi-Lenovo-G50-45:~/beagle-js$ node serializer-test.js | |
undefined:3 | |
var ref1=json;var ref2=ref1['a'];var ref3=ref2[0];var ref4=ref2[1];var ref5=ref2[10];var ref6=ref2[2];var ref7=ref2[3];var ref8=re | |
f2[4];var ref9=ref2[5];var ref10=ref2[6];var ref11=ref2[7];var ref12=ref2[8];var byteC=0;byteC+=1;byteC+=1;byteC+=bag.dynamicByteC | |
ounts['string'](ref5['pad']);byteC+=1;byteC+=1;byteC+=1;byteC+=1;byteC+=1;byteC+=1;byteC+=1;byteC+=bag.getVarUIntByteLength(ref2.l | |
ength);for (var j2=10;j2<ref2.length;j2++) { var ref13xn=ref2[j2];byteC+=1;}var wBuffer=bag.allocUnsafe(byteC);bag.byteOffset=0;if | |
(typeof(ref3['a']) !== 'number'||ref3['a']<0||ref3['a']>255){bag.throwTypeError(ref3['a'],'number',0,255,'uint8');}bag.byteOffset | |
= wBuffer.writeUInt8(ref3['a'], bag.byteOffset, true);if (typeof(ref4['b']) !== 'number'||ref4['b']<0||ref4['b']>255){bag.throwTy | |
peError(ref4['b'],'number',0,255,'uint8');}bag.byteOffset = wBuffer.writeUInt8(ref4['b'], bag.byteOffset, true);if (typeof(ref5['p | |
ad']) !== 'string'){bag.throwTypeE |
This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.
Workshop Instructor:
This workshop is distributed under a CC BY-SA 4.0 license.
#!/bin/sh | |
# Download latest Debian image for microSD from https://beagleboard.org/latest-images | |
# List drives before inserting microSD | |
df -h | |
# Insert microSD, then Look for the newly listed SD drive (disk2s1) | |
df -h | |
# Unmount the microSD |
/* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License version 2 as | |
* published by the Free Software Foundation. | |
*/ | |
/dts-v1/; | |
/plugin/; | |
/ { | |
compatible = "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green"; |
Grove - 3-Axis Digital Accelerometer(±16g)
Userspace Library:
ADXL345 Input 3-Axis Digital Accelerometer Linux Driver
root@beaglebone:~# echo si7005 0x40 > /sys/class/i2c-adapter/i2c-2/new_device
root@beaglebone:~# dmesg |tail -1
[ 5496.770283] i2c i2c-2: new_device: Instantiated device si7005 at 0x40
root@beaglebone:~# find /sys/ -type f |grep iio |grep -v /power/ | xargs more
::::::::::::::
/sys/bus/iio/drivers_autoprobe
::::::::::::::
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig | |
index 1ddd13c..b9d7919 100644 | |
--- a/drivers/power/Kconfig | |
+++ b/drivers/power/Kconfig | |
@@ -495,6 +495,13 @@ config CHARGER_RT9455 | |
help | |
Say Y to enable support for Richtek RT9455 battery charger. | |
+config MONITOR_ADC121C021_I2C | |
+ tristate "ADC121C021 Battery Monitor" |