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
#define debug 0 | |
#define deadband 50 | |
#define nchannels 4 | |
typedef struct{ | |
int16_t steer; | |
int16_t speed; | |
} Serialcommand; | |
volatile Serialcommand command; |
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 | |
# MQTT Broker settings | |
BROKER="193.169.2.1" | |
PORT=1883 | |
USERNAME="openipc" | |
PASSWORD="brokerpass" | |
SUB_TOPIC="camera/$1/#" | |
MOTOR_BINARY="ingenic-motor" | |
MQTT_BINARY="mosquitto_sub" |
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/ash | |
# OpenWrt cron job to check the connection and, if there is no connection, | |
# reboot the Huawei E3272 modem using the hilink api. This script is optimized | |
# for busybox and written in ash. | |
# Put this script in /bin/check_connection and then: chmod +x /bin/check_connection | |
# Then: crontab -e | |
# */15 * * * * /bin/check_connection > /tmp/reboot_con.log 2>&1 | |
f="/tmp/reboot_lock" | |
if [ ! -f "$f" ]; then |
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 | |
# | |
# Binary file compiler. | |
# Creates a file for programming onto a flash chip. | |
# | |
# Example: | |
# ./compile4programmer.sh stock-uboot.bin uImage.t31 rootfs.squashfs.t31 8 | |
# | |
# Running this command will produce a new binary file | |
# full4programmer-8MB.bin or full4programmer-16MB.bin |
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
unsigned long int ft, lt, x, tfail; | |
int ch, chx[9][13]; | |
const int idx = 10; | |
const int total = 11; | |
const int val = 12; | |
void setup() { | |
Serial.begin(9600); | |
ft=0; lt=0; x=0; tfail=0; ch=0; |
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
from six.moves import input | |
# Need to install googlevoice | |
# pip install googlevoice | |
from googlevoice import Voice | |
def run(): | |
username = "zxcv@gmail.com" | |
pwd = "123456" | |
voice = Voice() | |
voice.login(email=username, passwd=pwd) |
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 -e | |
##!! PLEASE USE THIS SCRIPT WITH CAUTION - AND AT YOUR OWN RISK !!## | |
##!! IT HAS BEEN KNOWN TO CAUSE RESETS AND WIPE DATA ON SOME CHROMEBOXES !!## | |
APPLICATION="${0##*/}" | |
ANSWER='' | |
SUDO='' | |
USAGE=" | |
$APPLICATION [no options] |