Go Down

Topic: In function 'void loop()':... (Read 6381 times) previous topic - next topic


I don't really see what i did wrong, But this is the error i get when i try to compile/upload something.
Code: [Select]
In function 'void loop()':
error: invalid conversion from 'int' to 'const uint8_t*'

The code is:
Code: [Select]
#include <Tone.h>
Tone tone1;
int spkpin = 9;//the speaker (digital PWM)pin is 9
int note = 440;
int singlebyte = 0;
void setup()

void loop()
note = analogRead(1);
singlebyte = map(note,0,1023,0,255);
tone1.play(note);//plays the current note
Serial.write(singlebyte, BYTE);


And something in this line
Code: [Select]
Serial.write(singlebyte, BYTE);
Is causing it to go kaput.
I don't see what could possibly be wrong here.  :o
Any ideas?


Try Serial.print not Serial.write :]


Go Up