Dangerous Prototypes

Other projects => Past projects => #twatch network LCD backpack => Topic started by: sheetzam on December 01, 2009, 05:20:43 pm

Title: Matrix Orbital commands?
Post by: sheetzam on December 01, 2009, 05:20:43 pm
Can someone link to the proper Matrix Orbital commands for use with the #twatch?
Title: Re: Matrix Orbital commands?
Post by: ian on December 01, 2009, 05:26:20 pm
Here's the command set supported:
http://code.google.com/p/dangerous-prot ... rver.c#201 (http://code.google.com/p/dangerous-prototypes-open-hardware/source/browse/trunk/%23twatch/source/twatch-v0b/LCDTCPServer.c#201)

Here's where the commands are implemented:
http://code.google.com/p/dangerous-prot ... rver.c#106 (http://code.google.com/p/dangerous-prototypes-open-hardware/source/browse/trunk/%23twatch/source/twatch-v0b/LCDTCPServer.c#106)

- Backlight On Command, (066  000)
Backlight time (000) is ignored.

- Backlight Brightness, (152 000)
Backlight brightness is recognized but not implemented.
Title: Re: Matrix Orbital commands?
Post by: sheetzam on December 01, 2009, 05:43:52 pm
Hmm.  Either I'm doing something wrong, or there's a bug then.
If I do this php:
Code: [Select]
$fp=fsockopen('192.168.1.19', 1337);
if ($fp){
fwrite($fp, "xFEx4111"); //put cursor at postion 0,0
fwrite($fp, "xFEx58");  //clear display
sleep(1);
fclose($fp);
}

I get the blinking block cursor at the upper left corner, as I would expect.
However, the two lines of scrolling text continue to scroll, and after a few minutes the twitter feed updates and continues on its merry way.

Any ideas?
Title: Re: Matrix Orbital commands?
Post by: ian on December 01, 2009, 06:20:24 pm
Maybe try position line 0, character 1, I forget exactly how LCDSmartie numbers the character position. Worst case scenario, you can snoop the connection between LCDSmartie and VSPE with portmon and see how LCD Smartie numbers the lines.

Have you checked the source for the #twatch Perl lib?
http://whereisian.com/forum/index.php?topic=169.0 (http://whereisian.com/forum/index.php?topic=169.0)
Title: Re: Matrix Orbital commands?
Post by: sheetzam on December 01, 2009, 08:10:05 pm
Whew, ok, figured it out.
Here's what the code SHOULD have been:
Code: [Select]
$fp=fsockopen('192.168.1.19', 1337);
if ($fp){
fwrite($fp, "xFEx47x01x01");
sleep(1);
fclose($fp);
}

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01042065448session_write_close ( )...(null):0
20.01082197040ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01082197816Database_MySQL->query( ).../DatabaseHandler.php:119
40.05862336544Database_MySQL->error( ).../Db-mysql.class.php:273