ftduino error

Alles rund um TX(T) und RoboPro, mit ft-Hard- und Software
Computing using original ft hard- and software
Forumsregeln
Bitte beachte die Forumsregeln!
Antworten
Benutzeravatar
bluatigro
Beiträge: 22
Registriert: 25 Jun 2018, 15:44

ftduino error

Beitrag von bluatigro » 02 Jan 2019, 21:10

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 ) ;
}


Brian
Beiträge: 13
Registriert: 23 Jan 2015, 23:18
Wohnort: Enzkreis

Re: ftduino error

Beitrag von Brian » 02 Jan 2019, 21:21

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
ESP8266 ersetzt RoboIF bzw. TX(T) Controller,
mit Fischertechnik Aktoren und Sensoren.

Benutzeravatar
MasterOfGizmo
Beiträge: 2720
Registriert: 30 Nov 2014, 07:44

Re: ftduino error

Beitrag von MasterOfGizmo » 02 Jan 2019, 21:33

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.
Arduino für fischertechnik: ftDuino http://ftduino.de, ftDuino32 http://ftduino.de/32

Benutzeravatar
MasterOfGizmo
Beiträge: 2720
Registriert: 30 Nov 2014, 07:44

Re: ftduino error

Beitrag von MasterOfGizmo » 02 Jan 2019, 21:35

Arduino für fischertechnik: ftDuino http://ftduino.de, ftDuino32 http://ftduino.de/32

Benutzeravatar
bluatigro
Beiträge: 22
Registriert: 25 Jun 2018, 15:44

Re: ftduino error

Beitrag von bluatigro » 12 Jan 2019, 12:47

is it posible to control the ftduino whit freebasic or libertybasic ?

Benutzeravatar
MasterOfGizmo
Beiträge: 2720
Registriert: 30 Nov 2014, 07:44

Re: ftduino error

Beitrag von MasterOfGizmo » 13 Jan 2019, 08:00

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.
Arduino für fischertechnik: ftDuino http://ftduino.de, ftDuino32 http://ftduino.de/32

Antworten