that's just what I was thinking here as I was editing the code.
I looked up the manual for the xport so I can now see there's terminal options for setting it up, as well as their software and I can change 9600 to 2400
however I don't really see if it's possible to do all that from the pic. it seems it only needs to be done once? is that right?
I think the 16f628a internal OSC with 2400 should be reliable enough right?
it's a hobby project. I could take it even lower though there's not alot of data being sent.
the last function is now changed to
Code:
http_request:
adcVar = 56
' light LED to indicate HTTP GET request in progress:
high httpPin
inByte = "z"
SEROUT2 TX, T2400, ["GET /xport_test.php?action=insert&"]
serout2 tx, T2400, ["sensorValue=", DEC adcVar]
serout2 tx, T2400, [" HTTP/1.1", 10]
serout2 tx, T2400, ["HOST: brandejs.ca", 10, 10]
' wait for bytes from server:
' php script sends anything other than Z to end transmission:
while inByte == "z"
serin2 rx, T2400, [DEC inByte]
wend
' now we're disconnected:
connected = 0
' turn off LED, since GET request is complete:
low httpPin
return
Bookmarks