Retrieve a byte fom a function(newbie)


i trying pass byte function.
here code

code: [select]
byte nozzleresult = prowolco.getnozzlestatus(serial,pumpnumber);

code: [select]
byte getnozzlestatus(stream &serial, byte pumpnozzle);

code: [select]
byte prowolco::getnozzlestatus(stream &serial, byte pumpnozzle)
{
  byte bytes[3];
 
  bytes[0] = 0x10;
  bytes[1] = 0x10;
  bytes[2] = 0xb0;

  byte instructionresult = sendinstruction(serial, bytes);

  return instructionresult; 
};


i error in return

code: [select]
base.h:11:11: error: 'byte' not name type
   virtual byte getnozzlestatus(stream &serial, byte pumpnozzle) = 0;
           ^
in file included full.ino:1:0:
pp.h:8:3: error: 'byte' not name type
   byte getnozzlestatus(stream &serial, byte pumpnozzle);
   ^
full.ino: in function 'void loop()':
full.ino:47:36: error: 'class pp' has no member named 'getnozzlestatus'
'class pp' has no member named 'getnozzlestatus'

i suspect need #include <arduino.h> - why wise post complete program.

...r


Arduino Forum > Using Arduino > Programming Questions > Retrieve a byte fom a function(newbie)


arduino

Comments