Dashboard v0.4

InfoInfo
Search:    

Stage 4:

Suggested Reading [WWW]http://www.perceptualedge.com/library.php#Books

This builds upon the Dashboard v0.1 (Fall 2008), Dashboard v0.2 (Spring 2009) and Dashboard v0.3 (Spring 2009).

Work on this section began April 24, 2009.

The goals of this section are:

Progress:

Apr24a.JPG Apr24b.JPG
Apr 24, 2009 Apr 24, 2009

Code

#Learning2.pde

void setup()
{
  Serial.begin(9600);
  delay(5000);
  //backlightOn();
}

void loop()
{
  Serial.print(0xFE, BYTE);   //command flag
  Serial.print(192, BYTE);    //positions cursor at line 2.
  Serial.print(40, BYTE);     //ASCII code: "("
  Serial.print(65, BYTE);     //ASCII code: "A"
  Serial.print(100, BYTE);     //ASCII code: "d"
  Serial.print(97, BYTE);     //ASCII code: "a"
  Serial.print(109, BYTE);     //ASCII code: "m"
  Serial.print(41, BYTE);     //ASCII code: ")"
  Serial.print(0xFE, BYTE);   //command flag
  Serial.print(128, BYTE);    //positions cursor at line 1.
  Serial.print("Adam");

//Prints:
//Adam
//(Adam)
}

#Learning3.pde

void setup() {
  beginSerial(9600);
}

void loop() {
  clearLCD();
  Serial.print(" Hello");  // print text to the current cursor position
  newLine();              // start a new line
  Serial.print("Arduino");
  delay(5000);
}

// clear the LCD
void clearLCD(){
  Serial.print(12, BYTE);
  Serial.print(0xFE, BYTE);
  Serial.print(128, BYTE);
}

// start a new line
void newLine() {
  Serial.print(10, BYTE);
  Serial.print(0xFE, BYTE);
  Serial.print(192, BYTE);
}
# Learning4.py
# Adam Crymble, Apr 27, 2009.
# This Code Does Not Work!!!!!!!!!!!!!!!!!!!!!!!!

import serial, sys

SERIALPORT = "COM5"

def printing():
        ser = serial.Serial(SERIALPORT, 9600)
        ser.write("abc")
        print ("should print abc by now")
        time.sleep(5)
        ser.write("def")
        print ("should print def by now")
        ser.close()        #close serial port

printing()
This is a Wiki Spot wiki. Wiki Spot is a non-profit organization that helps communities collaborate via wikis.