Skip to content

Instantly share code, notes, and snippets.

View bitmorse's full-sized avatar
👋

Sam Sulaimanov bitmorse

👋
View GitHub Profile
@bitmorse
bitmorse / convert_dat.py
Last active May 1, 2024 14:12
How to record data from an STWIN.box (STEVAL-STWINBX1) on a Raspberry Pi via USB and convert the resulting .dat files to Pandas df or numpy arrays.
'''
# README FIRST #
###Goal###
On a Raspberry Pi, read .dat files created by STWIN.box from disk and get numpy or pandas objects to work with.
### Requirements ###
- Raspberry Pi
- ST-Link Debugger
- STWIN.box + USB-C Cable
const { adapters } = require('slcan');
const { dataTypes } = require('uavcan');
let body = {
dataTypeID: 'uavcan.protocol.param.GetSet',
value: {
index: 0,
value: {
integerValue: 123
@bitmorse
bitmorse / sendWithHologram
Created May 29, 2019 18:43
send a message using raw tcp sockets in node js
const Net = require('net');
const HologramKey = process.env.HOLOGRAM_KEY
const HologramHost = 'cloudsocket.hologram.io'
const HologramPort = '9999'
let sendWithHologram = function(payload, topic){
let HologramClient = new Net.Socket();
@bitmorse
bitmorse / OIBUS_UAVCAN_DEBUGGER.py
Created May 17, 2019 00:05
OIBUS_UAVCAN_DEBUGGER
from multiprocessing import Process, Queue
import uavcan
from contextlib import closing
import tkinter
def node_status_callback(event):
print('#',event.transfer.source_node_id,': ', event.message.uptime_sec)
# Messages, service requests, service responses, and entire events
/*
* exo2.cpp
*
* Created on: Oct 3, 2016
* Author: sam
*/
#include <vector>
#include <iostream>
using namespace std;
@bitmorse
bitmorse / rfid_reader.py
Created August 16, 2016 12:26
hacky checkpoint with rfid card reader
import serial
import sys
import wiringpi
from time import sleep
import Adafruit_Nokia_LCD as LCD
import Adafruit_GPIO.SPI as SPI
from simplemysql import SimpleMysql
from threading import Thread
from PIL import Image
@bitmorse
bitmorse / untitled
Created March 13, 2016 15:57
new_zim_run_for_monit
#!/bin/bash
PIDFILE=/var/run/zim_run.pid
case $1 in
start)
/usr/bin/python /home/pi/zim/mapa.py >/home/pi/log &
echo $! > ${PIDFILE};
;;
stop)
kill `cat ${PIDFILE}` ;;
{"version":"2.38.1-0","grid":{"layers":{"View All":{"name":"View All"},"Default layer":{"name":"Default layer"}},"xWidth":10,"yHeight":10},"modules":[{"url":"modules/types/server_interaction/webservice_search/","configuration":{"sections":{"postvariables":[{"sections":{},"groups":{"postvariables":[[{"destination":"data","filter":"none"}]]}}]},"groups":{"group":[{"url":["https://crossorigin.me/http://ttnstatus.org/gateways"],"method":["GET"],"dataType":["form"],"withCredentials":[[]],"showStatus":[[]],"button":[["button"]],"buttonlabel":["Refresh Gateways"],"buttonlabel_exec":["Refreshing Gateways..."],"onloadsearch":[["button"]],"debounce":[0],"resultfilter":["return data;"],"askConfirm":[[]],"confirmText":["Are you sure?"]}],"headers":[[{}]],"searchparams":[[{"destination":"url","fieldtype":"text"}]]}},"layers":{"View All":{"position":{"left":121,"top":0},"size":{"width":16,"height":8},"zIndex":0,"display":true,"title":"","bgColor":[255,255,255,0],"wrapper":true,"created":true,"name":"Default layer"},"Defaul
@bitmorse
bitmorse / ps3controller_test.js
Created January 25, 2016 14:23
octanis1_rover_ds3_controller
"use strict";
var GamePad = require( 'node-gamepad' );
var Cylon = require('cylon');
var controller = new GamePad( 'ps3/dualshock3' );
var rover_state = {

Keybase proof

I hereby claim:

  • I am bitmorse on github.
  • I am bitmorse (https://keybase.io/bitmorse) on keybase.
  • I have a public key whose fingerprint is 0B52 D8EE A461 4875 EEDB 0F89 8550 EAE8 C1DD 950A

To claim this, I am signing this object: