O XPort... before we addressed any other pins for a sensor, Theresa and I got both our Xports communicating with her server. I'm a little confused about the direction information is flowing through...we're connecting our microchip to "telbel", Theresa's server, that in written into both our codes. And at the moment, the php code lives only in her folder--But! my XPort is addressed to my IP address at ITP. '***************************************************************** '* Name : xport_hello.pbp * '* Author : Patrick Dwyer * '* Notice : Copyright (c) 2006 * '* : Licensed under G* '* Date : 2/14/2006 * '* Version : 1.0 * '* Notes : * '* : * '*****************************************************************
' We are using a 20Mhz oscillator DEFINE OSC 20
' We communicate with the XPort using 9600 8N1 serial true9600 con 84
' Our serial communication pins tx var PORTC.6 rx var PORTC.7
' Our blinking pin for status messages statusPin var PORTC.4 'potPin var PORTC.2 OUTPUT statusPin 'output potpin
' Used to read response from the XPort inByte var byte
' Track whether or not we are connected to the remote server connected var bit connected = 0
'' Turn on our LED so we know that the startup sequence is going 'high statusPin
'' Wait for the XPort to boot up 'pause 5000
'' Turn off the status LED while operating 'LOW statusPin
'' Just so we know that we're ready, we'll quickly blink the status LED counter var byte counter = 0 while counter < counter =" counter" connected =" 1" connected =" 1" counter =" 0" counter =" counter" msg2="Polo"> 0 serin2 rx, true9600, [inByte] wend
' now we're disconnected: connected = 0
' turn off LED, since GET request is complete: low statusPin return
|
0 Comments:
Post a Comment
<< Home