Shop OBEX P1 Docs P2 Docs Learn Events
FREQOUT inside FOR-NEXT loop — Parallax Forums

FREQOUT inside FOR-NEXT loop

pianomanpianoman Posts: 1
edited 2007-12-28 21:10 in Robotics
This is what I tried:

X VAR Word
FOR X = 5000 TO 3000
FREQOUT 0, 100, X
NEXT

I was hoping to get a sound with decreasing frequency. No luck.

Any ideas?

Comments

  • FranklinFranklin Posts: 4,747
    edited 2007-12-28 21:08
    Try making x a byte and reduce your for loop accordingly.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-12-28 21:10
    How long did you wait? The loop you call out would take 200 seconds to do less than an octave.

    Try "Step 100" or something to get it to run faster.
Sign In or Register to comment.