Thursday, November 20, 2008

develop google app engine with eclipse on mac

Here are the two notes for Mac user, when setting up pydev of eclipse on mac:

The path of the python interpreter for eclipse on mac leopard:
/System/Library/Frameworks/Python.framework/Version/2.5/bin/Python2.5


The path for "Run > Open Run dialog > python run > main module:
/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/dev_appserver.py


Tutorial
http://daily.profeth.de/2008/04/google-app-engine-eclipse-pydev.html
http://de.youtube.com/watch?v=e1dtyQ6wqzc
http://www.ibm.com/developerworks/opensource/library/os-eclipse-mashup-google-pt1/

Monday, November 17, 2008

arduino tutorial structure



physical computing

time-critical computing of arduino

This workshop was hold by Vanessa. Here is their description.
http://geekphysical.blogspot.com/
Our "advanced" offering is for the (nearly) elites in the field. You're good, very good in fact, but you could be better; there are methods and sneaky ways of tricking that clever little chip into listening to your every whim, and we're going to teach you them. Our first advanced workshop will focus on time-critical computing, making the most of every nano-second spent running your program. Time is wasted all the time waiting for the Arduino to complete its loops, to run through all its processes, but what if you could run processes in parallel?

The basic idea is to turn off all the background programs done by arduino and do all the program such as managing the interrupts by the avr-libc to call micro-controller's basic function. In this way, we can make sure our program will not be interrupted by some unknown signals. It is useful. When making some sounds, it will not delay. When receiving data, it will not lose data.

example code

#define SET(x,y) (x |=(1<#define CLR(x,y) (x &= (~(1<#define CHK(x,y) (x & (1<#define TOG(x,y) (x^=(1<
SIGNAL(SIG_OUTPUT_COMPARE1A)
{
OCR1A+=10000;
TOG(PORTB,5);
}

void setup()
{
}

void loop()
{
// Turn off all interrupts
TIMSK0=0;
TIMSK1=0;
TIMSK2=0;
EIMSK=0;
PCICR=0;

TCCR1A=0;
TCCR1B=0x03;
TCCR1C=0;
SET(TIMSK1,OCIE1A);
sei();

SET(DDRB,5);

while(1)
{
asm("nop");
}
}