Understanding Boolean Data Types and Using the Boolean NOT (!) operator to Switch Arduino Pin States
🤩 How much Arduino can you learn in 7 Days? 👇
bit.ly/7_Day_Arduino_Challenge
**If you like this, I think you'll like the premium Arduino training we offer. Check it out here** bit.ly/3nSBPUs
Пікірлер: 36
****If you like this, I think you'll like the premium Arduino training we offer. You can check it out here**** bit.ly/3lHyzcB
Thank you for your explanation, makes the bool function much more clear to me. Ish - South Africa
It's so much easier learning this material in bite sized pieces, Another video well done. Thanks Michael.
@programmingelectronics
9 жыл бұрын
David Carr Thanks David! I am glad these can help.
Excellent video on basic programming concept! Great work. Regards,
@programmingelectronics
9 жыл бұрын
LearningZone Thanks a ton! I appreciate the kind words.
Always a great help. Thank you 🙌
@programmingelectronics
Жыл бұрын
Thanks so much!!!
Excellent !! Thank you sooooo much 🙏🏻
@programmingelectronics
Жыл бұрын
Glad it was helpful!
Thx man!
Thanks Man. It was really confusing.
Holy hell this was almost 6 years ago.. so i expect no reply but, why on earth would I want to do all of this instead of making "int" or something else, and after the delay simply putting a "!" with the "int" ... basically what makes boolean any different than another variable? Or is it just because it can literally only be on or off so it is easier to understand for simple tasks?
sir, how can you make a blink proportional to the serial data from processing? what i mean is, i wanted to have just a single blink per pixel of x axis in processing on each time i move. what i wanted to do is, i wanted to make the blink function of my led like of that of servo that it has corresponding steps, but instead if steps, i wanted it to have a blink per pixel i move with my gui in processing. but i dont know how to set a "map" like for example from 0pixel in x axis o a maximum of 366pixels is from 0 blink state of led to 366. i hope you get what i mean. pls help me figure this out ^_^
Got it and we can also make a simple home automation system
Thanks sir.
hai sir, can u pardon me to create one coding for our final project. my project about the fluorescent lamp. we use arduino uno. in this case, i need to create using boolean because my project is connect via webpage and actual switch. the probably right now is if i use both function, my relay got burn if i switch on lamp using webpage and switch off using actual switch. i need u response asap. sorry if my english very poor
This video is really helpfull thank you so much...
@programmingelectronics
2 жыл бұрын
Glad it was helpful!
why cannot set boolean in arduino schedule? arduino dont understand that comand.
When you re using not-boolean why you not use delay?
What about Strings??? are they true or false??
thanks
Thanks!
@programmingelectronics
4 жыл бұрын
You bet! Thanks for the note!
Awesome!!
@programmingelectronics
7 ай бұрын
Thank you! Cheers!
i got a LCD keypad shield on top of my arduino and i want to be able to press the select button on the LCD keypad shield to generate random numbers, the problem i'm having is "when i go press the select button, nothen happens, plz help and here is my code #include #include // this is factory config shield initialisation LiquidCrystal lcd(8, 9, 4, 5, 6, 7); // initialise the keypad DFR_LCD_Keypad keypad(A0, &lcd); int lcd_key = 0; int abc_key_in; #define btnSELECT 4 int read_LCD_buttons; int diceOne; int diceTwo; define btnSELECT 4 int read_LCD_buttons() { abc_key_in = analogRead(0); if (abc_key_in void setup() { lcd.begin(16, 2); lcd.setCursor(0, 0); lcd.print("Press to dice"); pinMode (A0, INPUT); } void loop() { lcd_key = read_LCD_buttons(); switch (lcd_key) { case btnSELECT{ diceOne = random(1, 7); diceTwo = random(1, 7); if (diceOne + diceTwo == 7) { lcd.clear(); lcd.setCursor(7, 0); lcd.print("7"); lcd.setCursor(3, 1); lcd.print("The pirate"); if (diceOne + diceTwo == 5, 4, 3, 2, 6 ) { lcd.clear(); lcd.setCursor(7, 0); lcd.print("5,4,3,2,6"); if (diceOne + diceTwo == 3,2,1,5,4,6) { lcd.clear(); lcd.setCursor(7, 0); lcd.print("fish"); } } } } }
Hello sir,i like your channel and it helped me to get started with arduino but im stuck at this Problem : my aim : i want to make a ldr to on and off an LEd (like a TV). what i coded : int led = 9; int ldr = A0; const int on = 700; const int off = 600; void setup() { pinMode(led,OUTPUT); pinMode(ldr,INPUT); Serial.begin(9600); } void loop() { int value = analogRead(ldr); Serial.println(value); switch (value) { case on : digitalWrite(led,HIGH); break; case off: digitalWrite(led,LOW); break; default: break; } } my obervation with ldr = max value 1023 and min value 500 at A0 Now my problem is "data type" as we all know ldr value will change i want to know that is there any data type which stores value from one range to another like (ex. 500-700 for ON ) and (700-1023 for off) .. or this is not possible with LDR it is still working though but i have to be fast as value must be equal to what i have specified (const int on and const int off ) . TV uses IR which have specific values but still its chellenging to do it with ldr
@programmingelectronics
8 жыл бұрын
+Siddharth Singh Rajawat Great question - you should check out this function, called map(), it might solve your problem. www.arduino.cc/en/Reference/Map Best of luck!
Thanks
@programmingelectronics
2 жыл бұрын
Thanks a ton for watching!
Enjoy your videos very entertaining (beating a dead horse lol) Question do I have to download a Boolean Library? because my IDE for my arduino due don't recognize this code.
@programmingelectronics
9 жыл бұрын
basimpsn You should have to download a library for using Boolean data types. Are you getting any specific errors when you compile the code?
Arduino titurial link my halp mi
okay, the dead dog has been officially kicked! you should've had the horse bone fall apart and hit the floor. be careful, that kind of bouillon with water can cause cancer to an arduino board