Shop OBEX P1 Docs P2 Docs Learn Events
DTMFOUT and arrays — Parallax Forums

DTMFOUT and arrays

DianeDiane Posts: 8
edited 2006-03-30 00:49 in BASIC Stamp
The BASIC Stamp manual has this line of code as an example:

DTMFOUT 10, [noparse][[/noparse]6, 2, 4, 8, 3, 3, 3,] 'Call Parallax

Will DTMFOUT understand the following chunk of code?

number VAR Nib(4)

... (number gets assigned a valid DTMF number)

DTMFOUT 1, [noparse][[/noparse]number]

I don't have the circuit on my board, but let's say that it's set up correctly. The syntax check tokenizes it sucessfully, but I don't trust it.

Many thanks!

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2006-03-30 00:41
    Diane,

    The command works as described in the example and in your sample loop. To convince yourself that the number is being correctly assigned, just put a DEBUG command after the DTMFOUT line and watch the numbers on the debug screen.

    To actually get the DTMF to dial, theres a bit of interface hardware between the stamp and the phone line. It consists of a special transformer and a couple of zener diodes. Total cost is about $10.

    I've used this process to successfully let the Stamp call a numeric pager and give a code number which represented a certain alarm condition of a piece of machinery.

    Cheers
  • DianeDiane Posts: 8
    edited 2006-03-30 00:49
    Most Excellent. Thanks Stamptrol!

    My class is actually building the circuit from scratch, but we haven't been issued the hardware yet (so I can't test the code).
Sign In or Register to comment.