Seite 1 von 1

ftduino error

Verfasst: 02 Jan 2019, 21: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

Verfasst: 02 Jan 2019, 21: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

Verfasst: 02 Jan 2019, 21: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

Verfasst: 02 Jan 2019, 21:35
von MasterOfGizmo

Re: ftduino error

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

Re: ftduino error

Verfasst: 13 Jan 2019, 08: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.