Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
from time import sleep
import RPi.GPIO as GPIO
import subprocess
import os
buttonPress = 0
streamOn = 0
#! /bin/bash
# Start X server on remote host
ssh pi@192.168.1.130 "xinit -- :1 > /home/pi/Utility/Logs/xinit.log 2>&1 & x11vnc -display :1 -forever -xrandr resize > /home/pi/Utility/Logs/xvnc11.log 2>&1 & ps -A | grep -E 'x11vnc|xinit'"
# Slow down
sleep 2
vncviewer 192.168.1.130
# Get its PID
#ifdef ANDROID
#define XID unsigned int
#define Bool int
#endif
#ifndef Bool
#define Bool int
#endif
grep -r "#define Bool" /home/technician/opt
#include <stdio.h>
#include <stdlib.h>
// function declerations
void readString(void);
// function definitions
void readString(){
char *line = NULL; /* forces getline to allocate with malloc */
$ cat /var/log/Xorg.0.log
[ 27.576]
X.Org X Server 1.17.2
Release Date: 2015-06-16
[ 27.577] X Protocol Version 11, Revision 0
[ 27.577] Build Operating System: Linux 3.10.69-1-ARCH armv7l
[ 27.577] Current Operating System: Linux SpyPi 4.1.8-1-ARCH #1 SMP PREEMPT Tue Sep 22 19:47:50 MDT 2015 armv7l
[ 27.577] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1280 bcm2708_fb.fbheight=800 bcm2709.boardrev=0xa01041 bcm2709.serial=0x3484a2f1 smsc95xx.macaddr=B8:27:EB:84:A2:F1 bcm2708_fb.fbswap=1 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
[ 27.579] Build Date: 17 July 2015 12:23:38PM
[ 27.579]
\version "2.18.2"
\header {
dedication = "Description"
title = "Title"
subtitle = "Subtitle"
subsubtitle = "Subsubtitle"
instrument = "Instrument"
composer = "Composer"
arranger = "Arranger"
@Technicus
Technicus / pic irc
Last active September 17, 2015 20:44
6:02:13 PM
ⓘ The freenode PIC microcontroller community | Microchip TCP IP Stack v6 doesn't support pic18 anymore. For pic18, you must stay with 5.4x version. Version 6.x add support for ipv6 and bigger SSL keysize ( 1024bit on pic24, 2048 on pic32 ). Bad news is that version 5.x will not receive any new developement, only bug fixes, so, no ipv6 (for example)
6:02:45 PM
Technicus
HELLO!!!
6:02:51 PM
Technicus
:)
6:03:05 PM
Technicus
@Technicus
Technicus / NovenaLCD
Last active September 16, 2015 16:01
This is the same screen as that used in the desktop and laptop Novena configurations.
It is a 13.3" amorphous silicon TFT active matrix IPS LCD at 1920 x 1080, 166 ppi,
350 cd/m2 luminance at max brightness, 700:1 contrast ratio (typical), 14ms TR, 11ms Tf (typical) response time,
and a wide viewing angle of approximately 89 degrees vertically or horizontally in any direction.
Information found from this page: < https://www.crowdsupply.com/sutajio-kosagi/novena >.
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/standard /tmp/build4729959347070805526.tmp/Roomba_Nerf_03.cpp -o /tmp/build4729959347070805526.tmp/Roomba_Nerf_03.cpp.o
In file included from Roomba_Nerf_03.ino:7:
include.h:1:28: warning: SoftwareSerial.h: No such file or directory
include.h:2:19: warning: SPI.h: No such file or directory
include.h:3:18: warning: Pixy.h: No such file or directory
Roomba_Nerf_03:37: error: ‘Pixy’ does not name a type
Roomba_Nerf_03:40: error: ‘SoftwareSerial’ does not name a type
Roomba_Nerf_03.ino: In function ‘void setup()’:
Roomba_Nerf_03:81: error: ‘roombaSerial’ was not declared in this scope
Roomba_Nerf_03:91: error: ‘pixy’ was not declared in this scope
void brushMotorCurrentTest_00(){
byte response[16];
int incomingByte = 0; // for incoming serial data
int timeOut = 40;
int bufferPos = 0;
byte howManyBytes = 2;
cleaningMotors(primary, 30); // spin the primary motor