Seite 1 von 1

ftduino error

BeitragVerfasst: 02 Jan 2019, 22:10
von bluatigro
error :
ftduino nt a class , namspace or enumaration

Code: Alles auswählen

#include "FtduinoSimple.h"

void setup() {
  pinMode( LED_BUILTIN , OUTPUT ) ;     // LED 13
}
void loop() {

  ftduino::output_set( ftduino::O1 , ftduino::HI ) ;
  ftduino::output_set( ftduino::O3 , ftduino::LO ) ;
  delay( 1000 ) ;
  ftduino::output_set( ftduino::O1 , ftduino::LO ) ;
  ftduino::output_set( ftduino::O3 , ftduino::HI ) ; //in this line of code ???
  delay( 1000 ) ;
}


Re: ftduino error

BeitragVerfasst: 02 Jan 2019, 22:21
von Brian
Hello "bluatigro",

bluatigro hat geschrieben:error :
ftduino nt a class , namspace or enumaration

Code: Alles auswählen

#include "FtduinoSimple.h"

void setup() {
  pinMode( LED_BUILTIN , OUTPUT ) ;     // LED 13
}
void loop() {

  ftduino::output_set( ftduino::O1 , ftduino::HI ) ;
  ftduino::output_set( ftduino::O3 , ftduino::LO ) ;
  delay( 1000 ) ;
  ftduino::output_set( ftduino::O1 , ftduino::LO ) ;
  ftduino::output_set( ftduino::O3 , ftduino::HI ) ; //in this line of code ???
  delay( 1000 ) ;
}



try to use a simple "." (dot) instead of two "::" in your code.

Best regards
Thomas

Edit: typo

Re: ftduino error

BeitragVerfasst: 02 Jan 2019, 22:33
von MasterOfGizmo
For the constants like O1 the preceding name must start with uppercase. In this case it should e.g. be Ftduino instead of ftduino. The uppercase is the class name while the lowercase version would be the instance. Have a closer look at the examples. They use this extensively.

Re: ftduino error

BeitragVerfasst: 02 Jan 2019, 22:35
von MasterOfGizmo

Re: ftduino error

BeitragVerfasst: 12 Jan 2019, 13:47
von bluatigro
is it posible to control the ftduino whit freebasic or libertybasic ?

Re: ftduino error

BeitragVerfasst: 13 Jan 2019, 09:00
von MasterOfGizmo
What do you mean by controlling it?

If you want to use these to write code that runs on the ftDuino then no. These generate pc programs which cannot run on anything but a pc.

If you want to use them to run code on a pc which controls an arduino via usb then yes. Both support writing pc software that makes use of the usb serial port. You could use this to send and receive commands from and to the ftDuino.