Skip to content

Instantly share code, notes, and snippets.

View silver2row's full-sized avatar
🧃
Cough, blur, dang!

set_ silver2row

🧃
Cough, blur, dang!
View GitHub Profile
@silver2row
silver2row / AM335x_PRU.cmd
Created November 9, 2021 00:34 — forked from jadonk/AM335x_PRU.cmd
PRU programming with Debian Stretch BeagleBoard.org IoT 2017-06-11 image
/****************************************************************************/
/* AM335x_PRU.cmd */
/* Copyright (c) 2015 Texas Instruments Incorporated */
/* */
/* Description: This file is a linker command file that can be used for */
/* linking PRU programs built with the C compiler and */
/* the resulting .out file on an AM335x device. */
/****************************************************************************/
-cr /* Link using C conventions */
@silver2row
silver2row / gpsDataWrite.py
Created April 26, 2019 19:28 — forked from jilkka/gpsDataWrite.py
Write GPS data to a file using Python and GPSd
# 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 September 5, 2018 01:56
RE: BBB and gpioinfo from libgpiod
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 April 24, 2018 19:39
Getting ideas for routine check-up...strace!
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 February 13, 2018 22:35
strace.log for 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 October 11, 2017 12:00
Getting Pusher to work on a sudo pip install 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)
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