This file contains 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
import serial | |
import time | |
import binascii | |
ser = serial.Serial( | |
port='/dev/ttyUSB0', | |
baudrate=2400, | |
timeout = 0.1, | |
stopbits=serial.STOPBITS_ONE, | |
bytesize=serial.EIGHTBITS |
This file contains 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 <xc.h> | |
#include <libpic30.h> | |
#include <stdio.h> | |
#include <math.h> | |
#include<uart.h> | |
This file contains 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 <xc.h> | |
#include <stdio.h> | |
#include <delays.h> | |
#pragma config FOSC=IRC,MCLRE=OFF,WDTEN=0,LVP=OFF,BOREN=OFF | |
//Functions | |
void setup(void); | |
unsigned int read_analog_channel(void); | |
void config_usart(void); |
This file contains 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
## program written by Shane Ormonde 7th sept 2013 | |
## updated on 25th January 2014 | |
## calculates the distance of a red dot in the field of view of the webcam. | |
import cv2 | |
from numpy import * | |
import math | |
#variables |
This file contains 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
## updated on 26th January 2014 | |
## scans surrounding area and plots x-y points forming a 2d map | |
import cv2 | |
from numpy import * | |
import math | |
import time | |
import serial | |
import matplotlib.pyplot as plt |
This file contains 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 <xc.h> | |
#include <stdio.h> | |
#include <delays.h> | |
#pragma config FOSC=IRC,MCLRE=OFF,WDTEN=0,LVP=OFF,BOREN=OFF | |
//Functions | |
void setup(void); | |
void config_usart(void); | |
void step_pos(int n); |
This file contains 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
#qpy:console | |
from androidhelper import Android | |
droid = Android() | |
if droid.checkBluetoothState().result == True: | |
print 'Bluetooth is on' | |
print " Phone info:" + str(droid.bluetoothGetLocalName()) | |
print "Computer info: " + str(droid.bluetoothGetRemoteDeviceName(address='88:53:2E:E8:65:4C')) | |
droid.bluetoothConnect(address='88:53:2E:E8:65:4C') # connect to computer |
This file contains 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
# Program written 17 April 2014 | |
# Enter default username and password | |
# waits for commands, then prints results | |
import telnetlib | |
tn = telnetlib.Telnet("192.168.1.100", "23") | |
print tn.read_until("Username>") # wait till prompted for username | |
tn.write("alien\n") |
NewerOlder