Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!well!tswift From: tswift@well.sf.ca.us (Theodore John Swift) Newsgroups: comp.sys.tandy Subject: Power on/off function in Tandy 200 Basic? Message-ID: <24800@well.sf.ca.us> Date: 16 May 91 00:20:50 GMT Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 44 I have a problem that y'all with Tandy 200s or Model 102s can help me with. There's a Power function in Tandy Basic, which, if given a numeric expression: POWER numeric expression sets the dwell before the M200 goes to sleep. Given arguments for time and date: POWER "hh:mm:ss","mm/dd/yy", BASIC program Power will tell the clock chip to set an alarm to wake everyone up at the given time and date, and will do some cool things: * If the power is on and your are at the main menu, Basic beeps and runs the named program. * If the power is on and you're not in the main menu, Basic beeps and prompts you to run the program. * If the power is off and was turned off manually, Basic beeps, stokes the boilers, and runs the program. * If the power is off and was turned off automatically, Basic beeps, turns power on, then prompts you to run the program. If you don't do anything for 40 seconds, Basic shuts down the show again. I want the M200 to wake up every 5 minutes, do some stuff like read some voltages from the ADC-812 board (which I bought from Rural Engineering, a pretty spiffy little product in itself), store them in a file, and go back to sleep to save power. But the POWER function doesn't seem to like a variable in the argument for the wake up call: I get a syntax error when I do this: 1 'program foo.ba to try out the power function 10 FOR I = 35 TO 45 STEP 5 'try it every 5 minutes 20 POWER "19:I:00", "05/14/91", FOO.BA 'this being 7:30 on tuesday 14 May 30 PRINT "GOOD MORNING" 40 POWER 10 'go back to sleep in a minute 50 NEXT I Now, ignoring the probably errors in the For-Next loop and other random weirdness, I get a syntax error on line 20. Adding confusion to injury, if I replace the I with something reasonable, like "POWER "19:45:00",etc., I get a type mismatch error. Grrr!. Any thoughts? Thanks -- ---------------------- Ted Swift tswift@well.sf.ca.us "You bally well are informed, Jeeves! Do you know everything?" "I don't know, sir" ~P.G. Wodehouse