Structuur van arduino programma

Arduino specifieke Software
Berichten: 132
Geregistreerd: 21 Feb 2013, 16:04

Structuur van arduino programma

Berichtdoor René » 21 Feb 2013, 16:30

Als nieuweling breek ik mijn hoofd over de juiste structuur van een Arduino programma.

Ik wil een toepassing bouwen met een pushbutton , een potmeter, een servo , een barometrische sensor en lcd scherm.
Daarnaast wil ik minimale powerconsumptie.

De toepassing kan in verschillende toestanden/statussen verkeren: Powerdown, handbediening, automatisch of configureren.

De button moet anders reageren afhankelijk van de "clicksoort":
Doe a bij single click, b bij doubleclick en c bij longclick.
Wat a,b of c is, hangt af van de toestand/status van de toepassing

Nu vind ik verschillende voorbeelden voor verschillende deelproblemen. Bijvoorbeeld hoe moet ik een Arduino laten slapen en wakker maken, of hoe moet ik meerdere functies aan een button hangen (single, double of longclick)

Mijn probleem is de samenhang van al die deel oplossingen.
Wie kan mij vertellen hoe de structuur van zo'n Arduino toepassing nu precies in elkaar moet zitten of waar ik dat kan vinden.

René

Advertisement

Gebruikers-avatar
Berichten: 229
Geregistreerd: 20 Jan 2013, 12:01

Re: Structuur van arduino programma

Berichtdoor astrofrostbyte » 21 Feb 2013, 22:06

Hier een opzet van een structuur , die ik regelmatig gebruik
Het idee erachter is gebruik maken van 'statemachines' om complexe taken in goed banen te leiden.

Ieder process : (Pushbutton) (potmeter) ( LCD) etc .. moet zo veel mogelijk zelf afhandelen,
Je wil dan dat zo'n process om iets vraagt , of dat jij iets aan een process vraagt.
bv , je vraagt het Process_PushButtons() of er nog een button is ingedrukt, zo JA welke button was/is dat dan.
bv , je vraagt de servo naar een nieuwe positie te gaan, en af en toe vraag je even of hij al klaar is.
Eigenlijk wil je er een object(C++) van maken.

Je communiceerd via vlaggen en variablen
Stukje code met een process voor afhandelen potmeter:
Code: Alles selecteren
struct Sensor_type {
 unsigned int Position;
 unsigned int RawValue;
 unsigned int OldValue;
 boolean      changed;
 boolean      valid;
};
Sensor_type Potmeter;

//-----------------------------------------------------------------
int Process_Potmeter() {
    Potmeter.RawValue = analogRead(A0); // read analog channel potmeter
    if( Potmeter.RawValue > 500)  // limit signal
       Potmeter.RawValue=500;     
    // Scale signal, store result in global Variable
    Potmeter.Position = 2 * Potmeter.RawValue + 20 ;
    if (Potmeter.OldValue != Potmeter.RawValue)
       Potmeter.changed = false;
    Potmeter.valid = true;        // set flag signal is valid and updated
}//Process_Potmeter



De Statussen/toestanden waarin het systeem/Software zich verkeerd kan je bv. opnemen in de statemachine in de loop();

Het is een makkelijke structuur om te implementeren, en redelijk goed te debuggen, als je naar de rs232 alle states van alle statemachine dumpt.

Deel van de Mainloop waar de Statussen/toestanden draaien:
Code: Alles selecteren
const byte RunMode_Booting       = 0;
const byte RunMode_Powerdown     = 1;
const byte RunMode_handbediening = 2;
const byte RunMode_automatisch   = 3;
const byte RunMode_configureren  = 4;
byte RunMode = 0;

//-----------------------------------------------------------------
void loop()  {
  switch (RunMode) {
  case RunMode_Booting:       //-----------------------------------
                // set servo to known location
                // set LCD to startup screen
                // Wait until BarSensor and Potmeter are valid
                if ( Potmeter.valid ) //&& BarSensor.valid && ..
                   RunMode=RunMode_automatisch;
    break;
  case RunMode_Powerdown:     //-----------------------------------
                // Switch of LCd
                // Configure system for wakeup sources
                // SLEEP()
                // if( legal wakeup reason) RunMode=RunMode_???;
    break;
  case RunMode_handbediening: //-----------------------------------

    break;
  case RunMode_automatisch:   //-----------------------------------
   
    break;
  case RunMode_configureren:  //-----------------------------------

    break;
  default:                    //-----------------------------------
    break;
  }

}//loop




Alle code met alle processen, toestanden bij elkaar, dit compileerd volledig in arduino:
Code: Alles selecteren
struct Sensor_type {
 unsigned int Position;
 unsigned int RawValue;
 unsigned int OldValue;
 boolean      changed;
 boolean      valid;
};
Sensor_type Potmeter;

struct Servo_type {
 unsigned int CurrentPosition;
 unsigned int TargetPosition;
 boolean      busy;
};
Servo_type Servo;


const byte RunMode_Booting       = 0;
const byte RunMode_Powerdown     = 1;
const byte RunMode_handbediening = 2;
const byte RunMode_automatisch   = 3;
const byte RunMode_configureren  = 4;
byte RunMode = 0;

//-----------------------------------------------------------------
void setup() {
}
//-----------------------------------------------------------------
int Process_Potmeter() {
    Potmeter.RawValue = analogRead(A0); // read analog channel potmeter
    if( Potmeter.RawValue > 500)  // limit signal
       Potmeter.RawValue=500;     
    // Scale signal, store result in global Variable
    Potmeter.Position = 2 * Potmeter.RawValue + 20 ;
    if (Potmeter.OldValue != Potmeter.RawValue)
       Potmeter.changed = false;
    Potmeter.valid = true;        // set flag signal is valid and updated
}//Process_Potmeter
//-----------------------------------------------------------------
int Process_BarSensor() {
                             // read signal from Baromtric sensor
                             // Scale signal , limit signal
                             // store result in global Variable
                             // set flag signal is valid and updated
}//Process_BarSensor
//-----------------------------------------------------------------
int Process_PushButtons() {
                            // statemachine to process button pushes
                            // Set Flag if Push occured & which type it is
                            // publish results in global Variable
}//Process_PushButtons
//-----------------------------------------------------------------
int Process_LCD() {
                              // statemachine to process LCD tasks
}//Process_LCD
//-----------------------------------------------------------------
int Process_Servo() {
                            // servo control statemachine
                            // handles everything related to servo
}//Process_Servo

//-----------------------------------------------------------------
void loop()  {
  switch (RunMode) {
  case RunMode_Booting:       //-----------------------------------
                // set servo to known location
                // set LCD to startup screen
                // Wait until BarSensor and Potmeter are valid
                if ( Potmeter.valid ) //&& BarSensor.valid && ..
                   RunMode=RunMode_automatisch;
    break;
  case RunMode_Powerdown:     //-----------------------------------
                // Switch of LCd
                // Configure system for wakeup sources
                // SLEEP()
                // if( legal wakeup reason) RunMode=RunMode_???;
    break;
  case RunMode_handbediening: //-----------------------------------

    break;
  case RunMode_automatisch:   //-----------------------------------
   
    break;
  case RunMode_configureren:  //-----------------------------------

    break;
  default:                    //-----------------------------------
    break;
  }

}//loop



poeh lang verhaal... moet nu weg...
Gear: Arduino- Uno,Due,Ethernet,Mega2560 , OLS LogicAnalyser, TDS1002, Rigol DG1022, J-Link EDU, BusPirate

Berichten: 132
Geregistreerd: 21 Feb 2013, 16:04

Re: Structuur van arduino programma

Berichtdoor René » 21 Feb 2013, 23:43

Wat leuk dat je zo snel en zo uitgebreid antwoordt. Je helpt me goed op weg, vriendelijk dank daarvoor.
Ik kom ongetwijfeld binnenkort met vervolg vragen.

Berichten: 132
Geregistreerd: 21 Feb 2013, 16:04

Re: Structuur van arduino programma

Berichtdoor René » 22 Feb 2013, 17:16

Kijken of ik het begrijp:
Ik heb in jouw code de meervoudige functie van de button toegevoegd.

Eerst heb ik OneBottun.h included
Vervolgens heb ik de functies (Click,DoubleClick en Press) uit OneBottun attached
Als die functies worden uitgevoerd heb ik (boolean) variabelen gezet voor clicken en de soort clicken
Tenslotte heb ik de variabelen gebruikt in de "case RunMode_handbediening:"
Mijn vraag is: klopt dit zo. met ander woorden, gaat het werken en is het netjes/efficiënt gecodeerd?
Mijn toegevoegde code staat tussen de regels //rrrrrrrrrrrrrrrrrrrrrrrrrrrrrr



Code: Alles selecteren
struct Sensor_type {
 unsigned int Position;
 unsigned int RawValue;
 unsigned int OldValue;
 boolean      changed;
 boolean      valid;
};
Sensor_type Potmeter;

struct Servo_type {
 unsigned int CurrentPosition;
 unsigned int TargetPosition;
 boolean      busy;
};
Servo_type Servo;


const byte RunMode_Booting       = 0;
const byte RunMode_Powerdown     = 1;
const byte RunMode_handbediening = 2;
const byte RunMode_automatisch   = 3;
const byte RunMode_configureren  = 4;
byte RunMode = 0;

//rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
#include "OneButton.h"

// Setup a new OneButton on pin A1. 
OneButton button(A1, true);


// setup code here, to run once:
void setup() {
 
  // link the click functions to be called from OneButton.h   
  button.attachClick(click);  // single click
  button.attachDoubleClick(doubleclick);   //double click
  button.attachPress(press);     // long click
} // setup

boolean clicked = false;
boolean single = false;
boolean double =false;
boolean long = false;

click() {
  clicked = true;
  single = true;
} // click 

doubleclick() {
  clicked = true;
  double = true;
} // doubleclick 
 
press() {
  clicked = true;
  long = true;
} // press 
 
//rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
int Process_Potmeter() {
    Potmeter.RawValue = analogRead(A0); // read analog channel potmeter
    if( Potmeter.RawValue > 500)  // limit signal
       Potmeter.RawValue=500;     
    // Scale signal, store result in global Variable
    Potmeter.Position = 2 * Potmeter.RawValue + 20 ;
    if (Potmeter.OldValue != Potmeter.RawValue)
       Potmeter.changed = false;
    Potmeter.valid = true;        // set flag signal is valid and updated
}//Process_Potmeter
//-----------------------------------------------------------------
int Process_BarSensor() {
                             // read signal from Baromtric sensor
                             // Scale signal , limit signal
                             // store result in global Variable
                             // set flag signal is valid and updated
}//Process_BarSensor
//-----------------------------------------------------------------
int Process_PushButtons() {
                            // statemachine to process button pushes
                            // Set Flag if Push occured & which type it is
                            // publish results in global Variable
}//Process_PushButtons
//-----------------------------------------------------------------
int Process_LCD() {
                              // statemachine to process LCD tasks
}//Process_LCD
//-----------------------------------------------------------------
int Process_Servo() {
                            // servo control statemachine
                            // handles everything related to servo
}//Process_Servo

//-----------------------------------------------------------------
void loop()  {
  switch (RunMode) {
  case RunMode_Booting:       //-----------------------------------
                // set servo to known location
                // set LCD to startup screen
                // Wait until BarSensor and Potmeter are valid
                if ( Potmeter.valid ) //&& BarSensor.valid && ..
                   RunMode=RunMode_automatisch;
    break;
  case RunMode_Powerdown:     //-----------------------------------
                // Switch of LCd
                // Configure system for wakeup sources
                // SLEEP()
                // if( legal wakeup reason) RunMode=RunMode_???;
    break;
  case RunMode_handbediening: //-----------------------------------
 
  //rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
      if clicked 
      {
          clicked != clicked;
          if single
          {
              single != single;
              RunMode=RunMode_automatisch;
          }   
       else if double
            {
               double != double;
               RunMode=RunMode_configureren;
             }
        else if long
             {
               long != long;
               RunMode=RunMode_Powerdown;
             }
      }
         
          // read potmeter
          // set servo
          // display on LCD
         
    //rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr   
    break;
  case RunMode_automatisch:   //-----------------------------------
   
    break;
  case RunMode_configureren:  //-----------------------------------

    break;
  default:                    //-----------------------------------
    break;
  }

}//loop

Berichten: 132
Geregistreerd: 21 Feb 2013, 16:04

Re: Structuur van arduino programma

Berichtdoor René » 22 Feb 2013, 18:15

Sorryyyyyy
In mij vorige post zaten nogal wat syntax / beginners fouten die ik zelf kon vinden. Hier de aangepaste versie.
Op nieuw dus.....
Kijken of ik het begrijp:
Ik heb in jouw code de meervoudige functie van de button toegevoegd.

Eerst heb ik OneBottun.h included
Vervolgens heb ik de functies (Click,DoubleClick en Press) uit OneBottun attached
Als die functies worden uitgevoerd heb ik (boolean) variabelen gezet voor clicken en de soort clicken
Tenslotte heb ik de variabelen gebruikt in de "case RunMode_handbediening:"
Mijn vraag is: klopt dit zo. met ander woorden, gaat het werken en is het netjes/efficiënt gecodeerd?
Mijn toegevoegde code staat tussen de regels //rrrrrrrrrrrrrrrrrrrrrrrrrrrrrr




Code: Alles selecteren
/*
 This is a sample sketch to show how to use the OneButtonLibrary
 to detect double-click events on a button.
 The library internals are explained at
 http://www.mathertel.de/Arduino/OneButtonLibrary.aspx
 
 Setup a test circuit:
 * Connect a pushbutton to pin A1 (ButtonPin) and ground.
 * The pin 13 (StatusPin) is used for output attach a led and resistor to ground
   or see the built-in led on the standard arduino board.
   
 The Sketch shows how to setup the library and bind a special function to the doubleclick event.
 In the loop function the button.tick function has to be called as often as you like.
*/
 
// 03.03.2011 created by Matthias Hertel
// 01.12.2011 extension changed to work with the Arduino 1.0 environment

#include "OneButton.h"

// Setup a new OneButton on pin A1. 
OneButton button(A1, true);


// setup code here, to run once:
void setup() {
  // enable the standard led on pin 13.
  pinMode(13, OUTPUT);      // sets the digital pin as output
 
  // link the doubleclick function to be called on a doubleclick event.   
  button.attachDoubleClick(doubleclick);
} // setup
 

// main code here, to run repeatedly:
void loop() {
  // keep watching the push button:
  button.tick();

  // You can implement other code in here or just wait a while
  delay(10);
} // loop


// this function will be called when the button was pressed 2 times in a short timeframe.
void doubleclick() {
  static int m = LOW;
  // reverse the LED
  m = !m;
  digitalWrite(13, m);
} // doubleclick

// End

Gebruikers-avatar
Berichten: 229
Geregistreerd: 20 Jan 2013, 12:01

Re: Structuur van arduino programma

Berichtdoor astrofrostbyte » 22 Feb 2013, 18:59

Die button library is wel mooi,
Je kan nu processen koppelen aan bepaalde keypresses.

Ik kan de code niet compileren, staan iets te veel syntax vouten in , double, long zijn gereserveerde C++ woorden
Zoals je het hebt opgezet is prima, goed leesbaar.
Code: Alles selecteren
if clicked   {
  clicked = false;
  if enkel
  {   enkel = false;
      RunMode=RunMode_automatisch;
  }   
  else if dubbel
  {   dubbel = false;
      RunMode=RunMode_configureren;
  }
  else if lang
  {   lang = false;           
      RunMode=RunMode_Powerdown;
  }
  else
  {  // click event without type ?!  should not come here. set Error flag
  }
}
Gear: Arduino- Uno,Due,Ethernet,Mega2560 , OLS LogicAnalyser, TDS1002, Rigol DG1022, J-Link EDU, BusPirate

Berichten: 132
Geregistreerd: 21 Feb 2013, 16:04

Re: Structuur van arduino programma

Berichtdoor René » 22 Feb 2013, 20:01

Dank je wel opnieuw.

Ik kan de code nu compileren (moesten nog wel "()" om de variabelen bij de if ) maar heb wel een vraag of het volgende goed gaat:

void click() {
clicked = true;
enkel = true;
} // click


Door de void bij de functie (lees ik in de handleiding) worden de resultaten niet teruggegeven aan het hoofdproces. "The void keyword is used only in function declarations. It indicates that the function is expected to return no information to the function from which it was called."

Ik vraag me daarom af of de waardes van de variabelen "clicked" en "enkel" dan wel beschikbaar zijn bij de case in de void loop()


Code: Alles selecteren
struct Sensor_type {
  unsigned int Position;
  unsigned int RawValue;
  unsigned int OldValue;
  boolean      changed;
  boolean      valid;
};
Sensor_type Potmeter;

struct Servo_type {
  unsigned int CurrentPosition;
  unsigned int TargetPosition;
  boolean      busy;
};
Servo_type Servo;


const byte RunMode_Booting       = 0;
const byte RunMode_Powerdown     = 1;
const byte RunMode_handbediening = 2;
const byte RunMode_automatisch   = 3;
const byte RunMode_configureren  = 4;
byte RunMode = 0;

//rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
#include "OneButton.h"

// Setup a new OneButton on pin A1. 
OneButton button(A1, true);


// setup code here, to run once:
void setup() {

  // link the click functions to be called from OneButton.h   
  button.attachClick(click);  // single click
  button.attachDoubleClick(doubleclick);
  button.attachPress(press);     // long click
} // setup

boolean clicked = false;
boolean enkel = false;
boolean dubbel = false;
boolean lang = false;

void click() {
  clicked = true;
  enkel = true;
} // click 

void doubleclick() {
  clicked = true;
  dubbel = true;
} // doubleclick 

void press() {
  clicked = true;
  lang = true;
} // press 

//rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
int Process_Potmeter() {
  Potmeter.RawValue = analogRead(A0); // read analog channel potmeter
  if( Potmeter.RawValue > 500)  // limit signal
    Potmeter.RawValue=500;     
  // Scale signal, store result in global Variable
  Potmeter.Position = 2 * Potmeter.RawValue + 20 ;
  if (Potmeter.OldValue != Potmeter.RawValue)
    Potmeter.changed = false;
  Potmeter.valid = true;        // set flag signal is valid and updated
}//Process_Potmeter
//-----------------------------------------------------------------
int Process_BarSensor() {
  // read signal from Baromtric sensor
  // Scale signal , limit signal
  // store result in global Variable
  // set flag signal is valid and updated
}//Process_BarSensor
//-----------------------------------------------------------------
int Process_PushButtons() {
  // statemachine to process button pushes
  // Set Flag if Push occured & which type it is
  // publish results in global Variable
}//Process_PushButtons
//-----------------------------------------------------------------
int Process_LCD() {
  // statemachine to process LCD tasks
}//Process_LCD
//-----------------------------------------------------------------
int Process_Servo() {
  // servo control statemachine
  // handles everything related to servo
}//Process_Servo

//-----------------------------------------------------------------
void loop()  {
  switch (RunMode) {
  case RunMode_Booting:       //-----------------------------------
    // set servo to known location
    // set LCD to startup screen
    // Wait until BarSensor and Potmeter are valid
    if ( Potmeter.valid ) //&& BarSensor.valid && ..
      RunMode=RunMode_automatisch;
    break;
  case RunMode_Powerdown:     //-----------------------------------
    // Switch of LCd
    // Configure system for wakeup sources
    // SLEEP()
    // if( legal wakeup reason) RunMode=RunMode_???;
    break;
  case RunMode_handbediening: //-----------------------------------

    //rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
   if (clicked)   {
  clicked = false;
  if (enkel)
  {   enkel = false;
      RunMode=RunMode_automatisch;
  }   
  else if (dubbel)
  {   dubbel = false;
      RunMode=RunMode_configureren;
  }
  else if (lang)
  {   lang = false;           
      RunMode=RunMode_Powerdown;
  }
  else
  {  // click event without type ?!  should not come here. set Error flag
  }
}
   

// read potmeter
// set servo
// display on LCD

//rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr   
break;
case RunMode_automatisch:   //-----------------------------------

  break;
case RunMode_configureren:  //-----------------------------------

  break;
default:                    //-----------------------------------
  break;
}

}//loop

Berichten: 85
Geregistreerd: 10 Jan 2013, 14:51
Woonplaats: Waddinxveen

Re: Structuur van arduino programma

Berichtdoor Karel » 22 Feb 2013, 20:22

Ik zou alle variabelen bij elkaar declareren, dus ook de booleans declareren vóór de setup().

Als je een functie een type meegeeft, dan kan je een waarde teruggeven. Bijvoorbeeld:

Code: Alles selecteren
boolean klikwaarde()
{
  if (het_een)
  {
     return true;
  }
  else if (het_ander)
  {
    return false;
  }
}


en dan kan je zeggen:

Code: Alles selecteren
  clicked = klikwaarde();


Dan wordt de functie klikwaarde uitgevoerd, en het resultaat dat de functie teruggeeft toegekend aan de variabele 'clicked'.
Maar jij wilt twee waarden teruggeven. Dan kan je dat doen met globale variabelen, dat zijn variabelen die in het hele programma gelden.
Dan moet je jouw booleans als 'volatile' declareren.
dus:

Code: Alles selecteren
volatile boolean clicked = false;
volatile boolean enkel = false;
volatile boolean dubbel = false;
volatile boolean lang = false;


Dan mag je de variabelen in de ene functie een waarde geven, en is die waarde in de de andere functie uit te lezen.

Gr. Karel
If you think education is expensive, try ignorance! (Derek Bok)

Gebruikers-avatar
Berichten: 229
Geregistreerd: 20 Jan 2013, 12:01

Re: Structuur van arduino programma

Berichtdoor astrofrostbyte » 23 Feb 2013, 08:29

Het gaat prima zo Rene, ik zou er nog delen functionaliteit bijmaken en dan nog eens kijken of het structureel netjes blijft.
Ik zou ook al voorbereidingen treffen om het debuggen wat te vergemakkelijken, michien kan je wat extra LED's aansluiten of al wat debug data naar de serieele terminal sturen.

Het systeem wat je gaat maken is toch wel vrij groot en er zullen zeker momenten komen dat het niet werkt, het is dan ook goed dat je inzicht krijgt hoe je programma loopt door bv. bij iedere RunMode verandering of button event een berichtje naar de serieele terminal te sturen.

Wat je ook kan helpen is toevoegen van extra code IF()'s die onlogische toestanden pakt en daarop een serieel berichtje stuurt.

Dit zal je zeker tijd gaan schelen 'in the long run' .
Gear: Arduino- Uno,Due,Ethernet,Mega2560 , OLS LogicAnalyser, TDS1002, Rigol DG1022, J-Link EDU, BusPirate

Berichten: 132
Geregistreerd: 21 Feb 2013, 16:04

Re: Structuur van arduino programma

Berichtdoor René » 05 Mrt 2013, 22:08

Eindelijk mijn spulletjes uit Hong Kong. Het echte werk is begonnen en dat gaat eigelijk heel goed. Dank zij jullie eerdere adviezen.
Ik heb mijn mini pro aan de praat met een lcd en mijn drukknop doet precies wat ik wil (enkel,dubbel en lang).
Mijn volgende uitdaging is om parameters voor mijn toepassing permanent op te slaan maar ook op een eenvoudige manier te kunnen onderhouden binnen de functie configureren. Met een schuif potmeter wil ik een aantal parameters kunnen wijzigen en opslaan in Flash.
Min zoek tocht levert nog niet iets op waar ik verder mee kan. Ik zie zaken als PROGMEM maar ook een aparte Flash library. Heeft hier iemand een goede suggestie? Hoe sla ik bijvoorbeeld mijn parameter "reaction_time" (getal <100) op en lees ik hem ook weer uit. Als als ik nu een paar van de parameters heb moet ik die dan in een array opslaan? zo ja hoe dan.
Groet
René

Volgende

Terug naar Arduino software

Wie is er online?

Gebruikers in dit forum: JustinzeLeade en 20 gasten