Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char* options4[] = {"hMin1", "hMax1", "refr1", "fSpeed1"};
- int option = 0;
- float variable = 82.0;
- if(Serial.available() > 0) {
- key = Serial.read();
- if(key == back) {
- return;
- } else if(key == fwd) {
- float newVar = adjust(String(options4[option%4]), variable);
- } else if(key == down) {
- option++;
- } else if(key == up) {
- option--;
- }
- }
- float adjust(char* str, float var) {
- ...do some stuff...
- display.print7Seg(str, 8);
- ...do stuff to var...
- return var;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement