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/python | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
from time import gmtime, strftime | |
import sys,random,socket | |
PORT_NUMBER = 8000 | |
HOSTNAME = socket.gethostname() | |
if len(sys.argv) > 1: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// --------------------------------------------------------------------------- Motors | |
// These are the pins to the the motor drive chip for the left wheel | |
int motor_left[] = {12, 13}; | |
// These are the pins to the the motor drive chip for the right wheel | |
int motor_right[] = {6, 7}; | |
// --------------------------------------------------------------------------- Setup | |
void setup() { | |
Serial.begin(9600); |
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 int i = 0; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
char buffer[50]; | |
sprintf(buffer, "the current value is %d", i++); | |
Serial.println(buffer); |