Skip to content

Instantly share code, notes, and snippets.

View Relys's full-sized avatar

Syler Clayton Relys

View GitHub Profile
@Relys
Relys / led_vesc_express.lisp
Last active April 11, 2024 19:41
LED Control for VESC Express
; LED Control for VESC Express
; Copyright 2024 Syler Clayton <syler.clayton@gmail.com>
; Debug flag for testing
(def debug 0)
; Features enabled
(def led-enable 1); Basic version works on previous VESC firmware
(def pubremote-enable 0); VESC 6.5 beta only. Also requires code-server
(def code-server-enable 0) ; VESC 6.5 beta only. If timeout you probably don't have script on VESC which starts the code-server.
@Relys
Relys / gps.py
Created July 30, 2020 01:32
poll gps data from ESP8266
#echo 'Time,Latitude,Longitude'> output.csv;while true; do python3 gps.py; sleep .5; done | tee -a output.csv
import urllib.request
import re
fp = urllib.request.urlopen("http://192.168.1.118")
mybytes = fp.read()
mystr = mybytes.decode("utf8")
fp.close()
temp=re.findall(r'-?[0-9]*\.[0-9]*',mystr)
void payload()
{
struct thread *td;
//Restore IDT state
void (*setidt)() = (void *)0xFFFFFFFF82603FA0;
setidt(IDT_DE, 0xFFFFFFFF825FED40, SDT_SYSIGT, SEL_KPL, 0);
setidt(IDT_DB, 0xFFFFFFFF825FECB0, SDT_SYSIGT, SEL_KPL, 0);
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctr/types.h>
#include <ctr/srv.h>
#include <ctr/APT.h>
#include <ctr/GSP.h>
#include <ctr/GX.h>
#include <ctr/HID.h>
#include <ctr/svc.h>