Shop OBEX P1 Docs P2 Docs Learn Events
eTape sensor — Parallax Forums

eTape sensor

KARIM102KARIM102 Posts: 75
edited 2011-02-08 06:45 in Learn with BlocklyProp
Does anyone have idea about eTape sensor, & can give me coding for it looooooool,,, i would like to know how u can connected with Basic Stamp??? cz the tap doesn't have wire connection????????????/ what should i buy with it???
·

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-01-28 05:12
    Did you look at the etape sample code? It's on the page where you buy them in a zip file.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • KARIM102KARIM102 Posts: 75
    edited 2010-01-28 10:42
    Yes i know the code, but i don't know how to fix the etape sensor in the breadborad for Baisc Stamp Home... cz the sensor doesn't have the teminal!!! what should i buy for it ?????????
  • eod_punkeod_punk Posts: 146
    edited 2010-01-28 23:57
    Did you read page 4 of the app notes? I don't think you did.
    http://www.parallax.com/Portals/0/Downloads/docs/prod/sens/eTape_AppNotes.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There is no problem that can't be solved with a suitable amount of explosives!

    EOD Memorial
  • KARIM102KARIM102 Posts: 75
    edited 2010-01-29 11:53
    thx a lot!!!!!!!!!!!! it helps a lot!!!!!!!!!!!!!!!!!
  • kmacken2kmacken2 Posts: 15
    edited 2011-02-08 06:45
    Hey everyone,

    Trying to program the eTape sensor using Propeller instead of Basic Stamp. Thought it would be similar to programming the AD592 Temperature sensor, but no such luck so far. Any suggestions?

    ''stick_demo_methods.spin

    CON
    _clkmode = xtal1 + pll16x ' 8x multiplier on clock
    _xinfreq = 5_000_000 ' clock is 5 MHz

    OBJ
    print : "Serial_Object" ' include serial object

    PUB Main | tempk, count ' MAIN PROGRAM
    repeat ' infinite loop
    count:=cnt ' store clock count
    tempk:=Measure_Temp(0) ' measure temperature on pin 0

    Print_LCD(1,tempk) ' print to lcd on pin 1
    'Print_HyperTerm(tempk) ' print to hyperterminal
    waitcnt(clkfreq*2+count) ' wait 2 sec

    PRI Measure_Temp(pin) | count,sum ' MEASURE TEMPERATURE
    sum := 0 ' set sum to 0
    repeat 300 ' repeat 300 times for average
    outa[pin] := 0 ' set pin to 0
    dira[pin] := 1 ' make pin an output
    waitcnt(clkfreq/1000 + cnt) ' wait for cap to discharge
    dira[pin] := 0 ' make pin an input
    count := cnt ' store counter value
    waitpeq(|<pin,|<pin,0) ' wait for change on pin
    count := ||(cnt-count)-240 ' clock cycles (total-delays)
    sum += clkfreq/count*355/1000 ' convert count to K, add to sum
    return sum/300 ' return variable = measured temperature

    PRI Measure_Column(pin) | count,sum1 ' MEASURE WATER COLUMN HEIGHT
    sum1 := 0 ' set sum to 0
    repeat 300 ' repeat 300 times for average
    outa[pin] := 2 ' set pin to 2
    dira[pin] := 1 ' make pin an output
    waitcnt(clkfreq/1000 + cnt) ' wait for cap to discharge
    dira[pin] := 0 ' make pin an input
    count := cnt ' store counter value
    waitpeq(|<pin,|<pin,2) ' wait for change on pin
    count := ||(cnt-count)-240 ' clock cycles (total-delays)
    sum1 += clkfreq/count*355/1000 ' convert count to K, add to sum
    return sum1/300 ' return variable = measured temperature

    PRI Print_LCD(pin,cook) ' PRINT TO LCD METHOD
    print.startx(pin,pin,19200) ' lcd on pin at 19200 baud
    print.str(string(22)) ' lcd enable, set number(don't change)
    print.str(string(12)) ' lcd clear, set number(don't change)
    waitcnt(clkfreq/100 + cnt) ' wait 1/100 sec for clear
    print.str(string(17)) ' Turn backlight on
    print.str(string("Temp = ")) ' print text string
    print.dec(cook) ' print decimal number
    print.str(string("K")) ' print text string
    print.str(string(168))
    print.str(string("Height= ")) ' print text string
    print.dec(cook)
    print.str(string("CM")) ' print text string
    waitcnt(clkfreq/10 + cnt) ' wait 1/10 sec before stopping
    print.stop ' stop print object
    return

    'PRI Print_HyperTerm(data) ' PRINT TO HYPERTERMINAL METHOD
    ' print.start(9600) ' start print object
    ' waitcnt(clkfreq/100 + cnt) ' wait 1/100 sec for clear
    ' print.dec(data) ' print decimal number
    ' print.crlf ' carrage return
    ' waitcnt(clkfreq/10 + cnt) ' wait 1/10 sec before stopping
    ' print.stop ' stop print object
    ' return
Sign In or Register to comment.