'********************************************************************* '* Tests features of the BalloonSat Easy * '* Won't begin until comit pin is pulled * '* Need to connect three sensors to analog I/O * '* Need to connect a servo (will swing from one side to the other) * '* Listen for 3 clicks from camera relay * '* Stores the word BalloonSat in memory * '* Then reads it back * '* There are 3 debug statements by the end of the test * '********************************************************************* i2cslave %10100000,i2cfast,i2cword ' set memory speed to 400 kHz and one word records low 0 Wait_to_Test: if pin7 = 0 then Wait_to_Test ' test commit pin debug pause 1000 ' read 3 adcs readadc 0,b0 readadc 1,b1 readadc 2,b2 debug pause 1000 servo 3,100 ' test servo pause 1000 servo 3,200 for b0 = 1 to 3 ' click rely three times high 5 pause 500 low 5 next for w0 = 0 to 13 writei2c w0,(0) ' erase memory pause 10 next w0 = 0 writei2c w0,("BalloonSat") ' write BalloonSat pause 100 readi2c w0,(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10) debug ' display BalloonSat pause 60000 end