PINK
jabezsdavid
Posts: 11
hi, last week I brought a parallax internet netburner kit. I want to display the temperature reading from DS1620 onto a web page. could please help me, how to proceed with the programming.
Comments
Once you have the pieces working (DS1620 readings using the included demo program(s) and basic communications with the PINK), you should be able to start experimenting with the examples in the PINK documentation to the point where you understand how to send the data from the DS1620 to PINK variables. Then you'll have to do the web page design to make that look the way you want. The web page design is something we can't help you with. There are plenty of book and tools out there for that.
If you have specific questions along the way, do ask. The more information you provide when you ask, the more useful you'll find the answers.
Note: The PINK operates at 5V while the Propeller operates at 3.3V. You need resistors in the signal lines between them to protect the Propeller (or some other voltage translation circuitry). 2.2K resistors will do.
Post Edited (Mike Green) : 7/5/2010 2:57:21 PM GMT
' {$STAMP BS2p}
' {$PBASIC 2.5}
x VAR Word
TempC VAR Word
TempF VAR Word
DQ PIN 13
CLK PIN 12
RST PIN 11
TX PIN 15
RX PIN 14
SETUP:
HIGH RST
OWOUT DQ ,LSBFIRST,[noparse][[/noparse]$0C,%10]
OWOUT CLK,LSBFIRST,[noparse][[/noparse]$0C,%10]
LOW RST
PAUSE 10
HIGH RST
OWOUT DQ ,LSBFIRST,[noparse][[/noparse]$EE]
OWOUT CLK,LSBFIRST,[noparse][[/noparse]$EE]
LOW RST
MAIN:
DO
GOSUB READ_DS1620
SEROUT 15, 386,[noparse][[/noparse]"!NB0W20:", DEC TempC, CLS]
SEROUT 15, 386,[noparse][[/noparse]"!NB0W21:", DEC TempF, CLS]
PAUSE 1000
LOOP
READ_DS1620:
HIGH RST
OWOUT DQ ,LSBFIRST,[noparse][[/noparse]$AA]
OWOUT CLK,LSBFIRST,[noparse][[/noparse]$AA]
OWIN DQ,LSBPRE,[noparse][[/noparse]X]
OWIN CLK,LSBPRE,[noparse][[/noparse]X]
LOW RST
X.BYTE1=-X.BIT15
TempC=X*5
IF (TempC.BIT15=0)THEN
TempF=TempC+2732*9/5-4598
ELSE
TempF=TempC-2732*9/5-4598
ENDIF
RETURN