This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
while true | |
do | |
################### | |
#read fuel gauge B9h | |
BAT_GAUGE_HEX=$(i2cget -y -f 0 0x34 0xb9) | |
#read power op mode | |
POWER_OP_MODE=$(i2cget -y -f 0 0x34 0x01) | |
# get charging indicator | |
CHARG_IND=$(($(($POWER_OP_MODE&0x40))/64)) # divide by 64 is like shifting rigth 6 times |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SIMPLE COIN MONITOR USING | |
# https://pypi.python.org/pypi/websocket-client | |
import websocket | |
import json | |
import time | |
# CONSTANTS | |
URL = "wss://api.hitbtc.com/api/2/ws" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TACOBOT - A FUN SLACK BOT | |
# ROBERT WOLTERMAN, 2017 | |
# YAY | |
import os | |
import sys | |
import slackclient | |
import threading | |
import time | |
import json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/arm 4.4.13 Kernel Configuration | |
# | |
CONFIG_ARM=y | |
CONFIG_ARM_HAS_SG_CHAIN=y | |
CONFIG_NEED_SG_DMA_LENGTH=y | |
CONFIG_ARM_DMA_USE_IOMMU=y | |
CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8 | |
CONFIG_MIGHT_HAVE_PCI=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
FUEL=$((`/usr/sbin/i2cget -y -f 0 0x34 0xb9`)) | |
if [ $FUEL -lt 15 ] | |
then | |
echo "default-on" > /sys/class/leds/chip\:white\:status/trigger | |
elif [ $FUEL -eq 127 ] | |
then | |
echo "flash" > /sys/class/leds/chip\:white\:status/trigger | |
else | |
echo "none" > /sys/class/leds/chip\:white\:status/trigger |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Python Controlled, CHIP Powered Pinewood Derby Car | |
# Robert Wolterman, 2017 | |
# Module Imports | |
import CHIP_IO.GPIO as GPIO | |
# Global Variables | |
PIN_TO_USE = "XIO-P0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
“username” : “myuser”, | |
“password” : “pass”, | |
“secretkey" : “keepitsecret”, | |
“devices” : | |
[ | |
{“pin” : “XIO-P0”, “name” : “Light 1”, “state” : true, “time on” : 20, “time off” : 4, “timer” : “on”}, | |
{“pin” : “XIO-P2”, “name” : “Pump 1”, “state” : true, “time on” : 12, “time off” : 12, “timer” : “off”}, | |
{“pin” : “XIO-P4”, “name” : “Fan 1”, “state” : true, “time on” : 12, “time off” : 12, “timer” : “off”}, | |
{“pin” : “XIO-P6”, “name” : “Random 1”, “state” : true, “time on” : 12, “time off” : 12, “timer” : “off”} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"defaultPage" : "Apps", | |
"pages": [ | |
{ | |
"name": "Apps", | |
"items": [ | |
{ | |
"name": "Terminal", | |
"icon": "appIcons/terminal.png", | |
"shell": "vala-terminal -fs 8 -g 20 20" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 2016 ROBERT WOLTERMAN (xtacocorex) | |
# WITH HELP FROM CHIP-hwtest/battery.sh | |
# THIS NEEDS TO BE RUN AS ROOT | |
# PROBABLY SET AS A CRON JOB EVERY 5 OR 10 MINUTES | |
# SIMPLE SCRIPT TO POWER DOWN THE CHIP BASED UPON BATTERY VOLTAGE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <sys/mman.h> | |
#include <string.h> | |
#define LRADC 0x01C22800 | |
#define CTRL_OFFSET 0x00 |