what if u want to blink the led in a SOS pattern (short, short, short, long, long, long, short, short, short) and use a button to toggle the SOS pattern on and press again to toggle SOS pattern off while using millis
First you should consider MORSE CODE TIMING PROTOCOL Dots and Dashes PART OF THE SAME LETTER - 1 Second between each DISTANCE BETWEEN LETTERS - 3 Seconds, then revert to Point 1 DISTANCE BETWEEN WORDS - 7 Seconds, then revert to Point1 and Point 2 Now use that to time your millis
@Ramesh Kumar, that was achieve by toggling the state of the pin. For example: // toggle LED state ledState_YEL = !ledState_YEL; The exclamation mark "!" is a logic NOT which toggles or inverts the state of the pin. If it is currently 1, it will become 0. If it os currently 0, it will become 1.
@@TechToTinker Hello I'm using blynk to achieve this where the delay function is restricted. Can you tell me how to use simpletimer library with blynk application?
@saurav, as of now, tft interfacing is possible but with VGA I think its impossible. I could be wrong but with the number of VGA pins, I would say use FPGA instead for efficiency.
Salamat po, Sir. Makakatulong po itong idea na ito para sa project namin na may SIM800L. Home Security System po kasi yung project namin. Kaso nahihirapan kaming pagsabayin ung receive at send ng alert ng SIM800L. Iniisip ko po kung makakatulong ito or may iba pang mas tamang way. Ito po ba ay pwede kong maimplement doon?
Hi JepDev, thank you for visiting. Yes this is one way to achieve mutitasking (doing multiple task at almost the same time). You need a little modifications to the source code provided and adapt it for your goal in the project.
The L.E.D. is OFF before the system starts, therefore it does start OFF on the off chance that the last state is on it checks with IF what the state of it is
@@TechToTinker sir hehe thanks sir pero medyo complicated na tingnan kasi may lcd display na.. Hehe simple lang po sana kasi ang gagawin ko po, 2 ultrasonic sensor na handwash using 1 board.. Tapos pag delay kasi ang gamit hindi magagamit ng sabay ang dalawang handwash kaya millis ang solution pero inaaral ko pa, or naghahanap ako ng code nalang hehe thanks good day 😊
@@elzjonz oic. As a start, ganito gawin mo sa main loop: 1. Check if sensor 1 is triggered, set a flag lets say sensor1 = True 2. Same for sensor 2 3. if sensor1 is true, run pump1 and sensor1= False 4. same for sensor2 Hope this could help you.
@@TechToTinker sir ok sir susubukan ko pgmakabalik ng bundok hehe weekly din kasi uwian doon kasi nagtuturo si misis ishare share ko lang din ang knowledge para ma inspire ang mga studyante doon hehe thanks sir more power sa channel nyo po 😊
ALSO FORMAT YOUR CODE BETTER ........LIKE THIS void loop () { if (digitaRead (tombol)==0) { digitalWrite (led, HIGH); delay (3000); digitalWrite (led, LOW); delay (3000); digitalWrite (led, HIGH); delay (3000); digitalWrite (led, HIGH); delay (3000); } else { digitalWrite (led, LOW); } } This makes Debugging sooooo much easier FYI void does not have upper case V and if you're keen you can make it even easier by doing this void loop () { // OPENS void loop Function if (digitaRead (tombol)==0) { // OPENS IF Statement 1 digitalWrite (led, HIGH); delay (3000); digitalWrite (led, LOW); delay (3000); digitalWrite (led, HIGH); delay (3000); digitalWrite (led, HIGH); delay (3000); } else { digitalWrite (led, LOW); }// CLOSES IF Statement 1 } // CLOSES void loop Function If you get in the habit of doing this 1. You'll never look for lost braces again 2. You will never have unbalanced braces again 3. and if you do, it will take you seconds to work it out GOOD FORMATTING IS IMPORTANT
Galing kabayan thanks!! Keep up the great work!
Very helpful, thanks.
what if u want to blink the led in a SOS pattern (short, short, short, long, long, long, short, short, short) and use a button to toggle the SOS pattern on and press again to toggle SOS pattern off while using millis
Hi zumzy666, just replying for the sake of others who might stumble here, I know you already see this :) ruclips.net/video/WujRf5Dha7w/видео.html
First you should consider MORSE CODE TIMING PROTOCOL
Dots and Dashes PART OF THE SAME LETTER - 1 Second between each
DISTANCE BETWEEN LETTERS - 3 Seconds, then revert to Point 1
DISTANCE BETWEEN WORDS - 7 Seconds, then revert to Point1 and Point 2
Now use that to time your millis
But how are they turning off automatically even though you didn't mention them to turn off after some interval?
@Ramesh Kumar, that was achieve by toggling the state of the pin. For example:
// toggle LED state
ledState_YEL = !ledState_YEL;
The exclamation mark "!" is a logic NOT which toggles or inverts the state of the pin. If it is currently 1, it will become 0. If it os currently 0, it will become 1.
@@TechToTinker Yes thank you.
@Ramesh Kumar, you're welcome. Thanks.
@@TechToTinker Hello I'm using blynk to achieve this where the delay function is restricted. Can you tell me how to use simpletimer library with blynk application?
Teach something about using vga interfacing to any tft displays using stm32f40x series.
@saurav, as of now, tft interfacing is possible but with VGA I think its impossible. I could be wrong but with the number of VGA pins, I would say use FPGA instead for efficiency.
You good programmer!
Thank you. Cheers.
Salamat po, Sir. Makakatulong po itong idea na ito para sa project namin na may SIM800L. Home Security System po kasi yung project namin. Kaso nahihirapan kaming pagsabayin ung receive at send ng alert ng SIM800L. Iniisip ko po kung makakatulong ito or may iba pang mas tamang way. Ito po ba ay pwede kong maimplement doon?
Hi JepDev, thank you for visiting. Yes this is one way to achieve mutitasking (doing multiple task at almost the same time). You need a little modifications to the source code provided and adapt it for your goal in the project.
Please make more videos related using thonny python on esp32 or stm32 rendering use of tft (7inch- 9inch)lcd displays and cam modules
Hi @saurav, thank you for your suggestion. I will take note of this.
Using millis how would you make the LED start off? It seems that the led must start on?? Thanks George. New subscriber!!!
The L.E.D. is OFF before the system starts,
therefore it does start OFF
on the off chance that the last state is on
it checks with IF what the state of it is
Could you please help me out on topics covering lvds or ttl cmos related tft driver boards making use of vga or hdmi interfacing.
Hello @Saurav Anand, as for now, LVDS or VGA is impossible to accomplish using microcontrollers. Try FPGA and Im sure it possible.
Sir pwede pa example ng may switch button or something na sensor magtitrigger for each led? Thanks
Hi @jon else, you mean like this one right? ruclips.net/video/ylLiFOdPCWQ/видео.html
@@TechToTinker sir hehe thanks sir pero medyo complicated na tingnan kasi may lcd display na.. Hehe simple lang po sana kasi ang gagawin ko po, 2 ultrasonic sensor na handwash using 1 board.. Tapos pag delay kasi ang gamit hindi magagamit ng sabay ang dalawang handwash kaya millis ang solution pero inaaral ko pa, or naghahanap ako ng code nalang hehe thanks good day 😊
@@elzjonz oic. As a start, ganito gawin mo sa main loop:
1. Check if sensor 1 is triggered, set a flag lets say sensor1 = True
2. Same for sensor 2
3. if sensor1 is true, run pump1 and sensor1= False
4. same for sensor2
Hope this could help you.
5. Turn ON pump1 and use millis counter to turn it OFF later on.
6. Same for pump2
@@TechToTinker sir ok sir susubukan ko pgmakabalik ng bundok hehe weekly din kasi uwian doon kasi nagtuturo si misis ishare share ko lang din ang knowledge para ma inspire ang mga studyante doon hehe thanks sir more power sa channel nyo po 😊
Sr. please make the code bellow becomes millis:
Void loop () {
if (digitaRead (tombol)==0){
digitalWrite (led, HIGH);
delay (3000);
digitalWrite (led, LOW);
delay (3000);
digitalWrite (led, HIGH);
delay (3000);
digitalWrite (led, HIGH);
delay (3000);
}
else {
digitalWrite (led, LOW);
}
}
How to be version millis Sr..???.,...
lol no
@@panelty8379
LOL.... Agreed,
there's nothing to show utter laziness like saying
Here is a blink sketch
convert it to millis
LOL
ALSO FORMAT YOUR CODE BETTER ........LIKE THIS
void loop ()
{
if (digitaRead (tombol)==0)
{
digitalWrite (led, HIGH);
delay (3000);
digitalWrite (led, LOW);
delay (3000);
digitalWrite (led, HIGH);
delay (3000);
digitalWrite (led, HIGH);
delay (3000);
}
else
{
digitalWrite (led, LOW);
}
}
This makes Debugging sooooo much easier
FYI void does not have upper case V
and if you're keen you can make it even easier by doing this
void loop ()
{ // OPENS void loop Function
if (digitaRead (tombol)==0)
{ // OPENS IF Statement 1
digitalWrite (led, HIGH);
delay (3000);
digitalWrite (led, LOW);
delay (3000);
digitalWrite (led, HIGH);
delay (3000);
digitalWrite (led, HIGH);
delay (3000);
}
else
{
digitalWrite (led, LOW);
}// CLOSES IF Statement 1
} // CLOSES void loop Function
If you get in the habit of doing this
1. You'll never look for lost braces again
2. You will never have unbalanced braces again
3. and if you do, it will take you seconds to work it out
GOOD FORMATTING IS IMPORTANT
Please make any tutorials on camera module interfacing and tft display interfacing with stm32f407vgt6.
Good idea, maybe in the future. Thank you for the suggestion
What the heck hahaha
@Asares Allen T., :)