To compile the code in this example, you can do
gcc -I. -o run_me support.c list.c starter.c
which you can convert to a Makefile at your leisure.
int pinA = 8; | |
int pinB = 9; | |
int lvlA; | |
int lvlB; | |
int delayTime = 3000; | |
void setup () { | |
Serial.begin(9600); | |
pinMode (pinA, OUTPUT); | |
pinMode (pinB, OUTPUT); |
/************************************** | |
* VARIABLES AND PINS | |
**************************************/ | |
/* Declare a variable to store the sensor reading. */ | |
int theReading; | |
/* Declare the pin we have attached the sensor to. */ | |
int TMP36 = A0; |
// Turning things on and off. | |
void setup () { | |
// First, tell the Arduino we want to make one | |
// of our pins an OUTPUT pin. | |
pinMode(13, OUTPUT); | |
} | |
void loop () { | |
// Tell the Arduino to turn on one of our pins. | |
digitalWrite(13, HIGH); |
import sys, os | |
import random, time | |
from subprocess import call | |
since_epoch = time.time() | |
assignment_directory = "assignment-%s" % since_epoch | |
num_files = random.randint(5, 15) | |
num_garbage = random.randint(5, 15) |
all: | |
gcc -o hello-os hello.c |
//send data routine | |
// link between the computer and the Serial Shield | |
//at 9600 bps 8-N-1 | |
//Computer is connected to Hardware UART | |
//Serial Shield is connected to the Software UART:D2&D3 | |
// # LEFT /dev/tty.usbserial-A901N3TL | |
#include <SoftwareSerial.h> |
// Test 001 | |
// Source: | |
// | |
// (let ((x0 7)) (let ((x1 2)) (if (> (+ 2 2) (if (> 4 x1) 2 0)) (+ x0 x0) x0))) | |
// | |
// Result (in RAM0): 14 | |
// Generated on 20130309 at 19:54. | |
// -----------------------------------// | |
@7 | |
D=A |
# Your program should probably end with this function, and call | |
# it to do everything. | |
def main(): | |
inf = sys.argv[1] | |
outf = sys.argv[2] | |
los = readFileToListOfLines(inf) | |
# Print here to see if things look right | |
losclean = stripEveryLine(los) |
// Turn two LEDs on then off. | |
// Declare variables for later use. | |
int greenLED; | |
int redLED; | |
void setup () { | |
// Assign values to our variables. | |
greenLED = 2; | |
redLED = 4; |