Skip to content

Commit 6108c0e

Browse files
committed
update readme
1 parent 399b7ba commit 6108c0e

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ using namespace Menu;
2828
#define LEDPIN LED_BUILTIN
2929
#define MAX_DEPTH 1
3030

31-
int timeOn=10;
32-
int timeOff=90;
31+
unsigned int timeOn=10;
32+
unsigned int timeOff=90;
3333

3434
MENU(mainMenu, "Blink menu", Menu::doNothing, Menu::noEvent, Menu::wrapStyle
35-
,FIELD(timeOn,"On","ms",0,100,10,1, Menu::doNothing, Menu::noEvent, Menu::noStyle)
36-
,FIELD(timeOff,"Off","ms",0,100,10,1,Menu::doNothing, Menu::noEvent, Menu::noStyle)
35+
,FIELD(timeOn,"On","ms",0,1000,10,1, Menu::doNothing, Menu::noEvent, Menu::noStyle)
36+
,FIELD(timeOff,"Off","ms",0,10000,10,1,Menu::doNothing, Menu::noEvent, Menu::noStyle)
3737
,EXIT("<Back")
3838
);
3939

@@ -56,12 +56,11 @@ void setup() {
5656
Serial.println("to control the menu navigation");
5757
}
5858

59+
bool blink(int timeOn,int timeOff) {return millis()%(unsigned long)(timeOn+timeOff)<(unsigned long)timeOn;}
60+
5961
void loop() {
6062
nav.poll();
61-
digitalWrite(LEDPIN, HIGH);
62-
delay(timeOn);
63-
digitalWrite(LEDPIN, LOW);
64-
delay(timeOff);
63+
digitalWrite(LEDPIN, blink(timeOn,timeOff));
6564
}
6665
```
6766
@@ -90,7 +89,7 @@ void loop() {
9089
- Tested on Arduino AVR's & ARM, Teensy, ESP8266, Esp32, nRF52, STM32
9190
9291
## Videos
93-
[![IMAGE ALT TEXT](https://img.youtube.com/vi/wHv5sU-HXVI/2.jpg)](https://youtu.be/wHv5sU-HXVI "Arduino menu 2.0 fields video") [![IMAGE ALT TEXT](https://img.youtube.com/vi/W-TRCziF67g/2.jpg)](https://youtu.be/W-TRCziF67g "Arduino menu basic features video")[![IMAGE ALT TEXT](https://img.youtube.com/vi/27KEUTpCHfg/2.jpg)](https://youtu.be/27KEUTpCHfg "Arduino menu 4.x")
92+
[![IMAGE ALT TEXT](https://img.youtube.com/vi/wHv5sU-HXVI/2.jpg)](https://youtu.be/wHv5sU-HXVI "Arduino menu 2.0 fields video") [![IMAGE ALT TEXT](https://img.youtube.com/vi/W-TRCziF67g/2.jpg)](https://youtu.be/W-TRCziF67g "Arduino menu basic features video")[![IMAGE ALT TEXT](https://img.youtube.com/vi/27KEUTpCHfg/2.jpg)](https://youtu.be/27KEUTpCHfg "Arduino menu 4.x")[![Esc over web]https://i9.ytimg.com/vi/ebOWG0ALUWI/mq2.jpg?sqp=CLSH_-YF&rs=AOn4CLDnihpapU5Td7n70HumeFYJ3gYnKQ](https://youtu.be/ebOWG0ALUWI)
9493
9594
## Plugins
9695
@@ -105,9 +104,12 @@ Some plugins might be platform specific or require some hardware.
105104
106105
## Applications
107106
108-
Some applications using ArduinoMenu, (current and older versions).
107+
Some applications/tutorials using ArduinoMenu, (current and older versions).
109108
Do you have another? please let me know on gitter or email me.
110109
110+
**mvc-interface** ArduinoMenu tutorial
111+
https://zaragozamakerspace.com/index.php/courses/mvc-interface/
112+
111113
**Arduino Automatic Copper Tape Cutter**
112114
https://www.thingiverse.com/thing:3557719
113115

0 commit comments

Comments
 (0)