Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Seth silver2row

🏠
Working from home
Block or report user

Report or block silver2row

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@silver2row
silver2row / gpsDataWrite.py
Created Apr 26, 2019 — forked from jilkka/gpsDataWrite.py
Write GPS data to a file using Python and GPSd
View gpsDataWrite.py
# Runs perfectly using Python 2.7.3 on Raspian.
# GPSD Official Documentation:
# http://www.catb.org/gpsd/gpsd_json.html
# Original GpsPoller script by Dan Mandle:
# http://www.danmandle.com/blog/getting-gpsd-to-work-with-python/
# Original readCoordinates funtion by recantha:
# https://github.com/recantha/picorder-v3/blob/master/picorder.py
# Additional modifications by Jacob Ilkka:
# http://blog.jacobilkka.com/python-gps-data-writer/
@silver2row
silver2row / gpioinfo
Created Sep 5, 2018
RE: BBB and gpioinfo from libgpiod
View gpioinfo
debian@beaglebone:~$ gpioinfo
gpiochip0 - 32 lines:
line 0: "MDIO_DATA" unused input active-high
line 1: "MDIO_CLK" unused input active-high
line 2: "SPI0_SCLK" "P9_22" input active-high [used]
line 3: "SPI0_D0" "P9_21" input active-high [used]
line 4: "SPI0_D1" "P9_18" input active-high [used]
line 5: "SPI0_CS0" "P9_17" input active-high [used]
line 6: "SPI0_CS1" "cd" input active-low [used]
line 7: "ECAP0_IN_PWM0_OUT" "P9_42" input active-high [used]
@silver2row
silver2row / filename.py
Created Apr 24, 2018
Getting ideas for routine check-up...strace!
View filename.py
2088 stat64("/usr/lib/python2.7", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
2088 stat64("/usr/lib/python2.7", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
2088 stat64("/usr/lib/python2.7/site", 0xbe8d4320) = -1 ENOENT (No such file or directory)
2088 open("/usr/lib/python2.7/site.arm-linux-gnueabihf.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
2088 open("/usr/lib/python2.7/site.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
2088 open("/usr/lib/python2.7/sitemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
2088 open("/usr/lib/python2.7/site.py", O_RDONLY|O_LARGEFILE) = 3
2088 fstat64(3, {st_mode=S_IFREG|0644, st_size=19947, ...}) = 0
2088 open("/usr/lib/python2.7/site.pyc", O_RDONLY|O_LARGEFILE) = 4
@silver2row
silver2row / MotorBridge.py
Created Feb 13, 2018
strace.log for MotorBridge.py
View MotorBridge.py
2474 execve("/usr/bin/python", ["python", "./MotorBridge.py"], [/* 15 vars */]) = 0
2474 brk(NULL) = 0x145d000
2474 uname({sysname="Linux", nodename="beaglebone", ...}) = 0
2474 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
2474 mmap2(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fe5000
2474 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
2474 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
2474 fstat64(3, {st_mode=S_IFREG|0644, st_size=24105, ...}) = 0
2474 mmap2(NULL, 24105, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6fdf000
2474 close(3) = 0
@silver2row
silver2row / pusher
Created Oct 11, 2017
Getting Pusher to work on a sudo pip install pusher
View pusher
Collecting pusher
Downloading pusher-1.7.2.tar.gz (155kB)
100% |████████████████████████████████| 163kB 51kB/s
Collecting six (from pusher)
Downloading six-1.11.0-py2.py3-none-any.whl
Collecting requests>=2.3.0 (from pusher)
Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
100% |████████████████████████████████| 92kB 93kB/s
Collecting urllib3 (from pusher)
Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
View LED-door.py
3855 read(8, "s 0 0\ncgroup /sys/fs/cgroup/free"..., 1024) = 940
3855 open("/sys/devices/platform/ocp/ocp:P8_13_pinmux/state", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
3855 open("/sys/devices/platform/ocp", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
3855 open("/sys/devices/platform/ocp/48304000.epwmss", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
3855 open("/sys/devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
3855 stat64("/sys/devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip6/pwm1", 0xbea9ff10) = -1 ENOENT (No such file or directory)
3855 open("/sys/devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip6/export", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
3855 stat64("/sys/devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip6/pwm1", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
3855 open("/sys/devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip6/pwm1/period", O_RDWR) = 4
3855 op
You can’t perform that action at this time.