Shop OBEX P1 Docs P2 Docs Learn Events
Simple IDE Examples issue — Parallax Forums

Simple IDE Examples issue

NWCCTVNWCCTV Posts: 3,629
edited 2013-07-04 23:39 in Propeller 1
Has anyone tried the Piezo sound program in the Simple IDE Examples? I have checked my code numerous times and can not find the problem. I am getting the error "expected } before numeric constant" on line 3 where the groups of 4 numbers are placed. Is it me or is there a problem with the example code???? Note, My Piezo is on Pin 0.

Here's my code:
#include "simpletools.h" // Include simpletools 


int note[]= {1047, 1175, 1319, 1397,
1568. 1760, 1976, 2093};


int main()
{ 
for(int i = 0; i < 8; i++)
{
freqout(0, 500, note[i]);
pause(68);
}
} 

Comments

  • Dave HeinDave Hein Posts: 6,347
    edited 2013-07-04 18:53
    You should have a comma instead of a period after the number 1568.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-07-04 23:39
    Thank you, I knew I had to be missing something simple!!!
Sign In or Register to comment.