Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
USER_LIB_PATH = lib | |
OBJDIR = bin | |
TARGET = $(firstword $(wildcard *.ino)) | |
BOARD_TAG ?= arduino_zero_native | |
FQBN ?= adafruit:samd:adafruit_feather_m0 | |
UPLOAD_PORT ?= $(wildcard /dev/tty.usbmodem*) | |
# just to trigger changes to target bin | |
CSRC := $(shell find . -type f -name '*.c') |
import datetime | |
import statistics | |
import plotly.express as px | |
import pandas as pd | |
from cantools.logreader import Parser | |
# path to comparison files | |
software_file = "/Users/john/Desktop/software-timestamps.log" | |
hardware_file = "/Users/john/Desktop/hardware-timestamps.log" |
obj-m += gs_usb.o | |
all: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
clean: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean | |
reload: gs_usb.ko | |
sudo rmmod gs_usb.ko | |
sudo insmod gs_usb.ko |
#include <Arduino.h> | |
#include <Wire.h> | |
#define COLS 96 | |
#define ROWS 16 | |
#define FRAME_SIZE ((ROWS * COLS) / 8) | |
#define COL_BYTES FRAME_SIZE / 8 | |
#define FOOTER_CHAR 0x03 |
""" | |
Game of Life async task that updates passed PIL Image with generations | |
loosely based on https://codereview.stackexchange.com/questions/125292/conways-game-of-life-in-python-saving-to-an-image | |
but fixes the critical bug which runs the frame update loop on a transient grid resulting in wrong behaviour - I don't have enough points to post fix! | |
Copied from part of a bigger project I'm working on, this can still be run with the python flipdot module imported using a script. | |
""" | |
import random, asyncio | |
from PIL import Image |
reg [3:0] d0; | |
reg [3:0] d1; | |
always @(posedge clk) | |
begin | |
d0 <= ((d0 & 9) == 9) ? 4'b0 : d0 + 1; | |
if ((d0 & 9) == 9) d1 <= d1 + 1; | |
end |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
var SerialPort = require('serialport'); | |
var port = new SerialPort('/dev/ttyUSB0', { | |
baudRate: 4800 | |
}); | |
port.on('open', function() { | |
port.write(new Buffer(256), function(err) { | |
if (err) { | |
return console.log('Error on write: ', err.message); | |
} |
#!/bin/sh | |
# @j_whittington | |
# | |
# Script to convert makefile generate from atmel studio 7 (windows) | |
# to linux path, assuming that you have gcc on PATH | |
# | |
# based on https://gist.github.com/theterg/6082389 | |
# GPL |
import os,sys | |
# Get folder | |
if len(sys.argv) > 1: | |
folder = sys.argv[1] | |
else: | |
# folder = os.path.dirname(os.path.realpath(__file__)) | |
folder = os.getcwd() | |
convert = { |