Arduino Tutorial 47: Binary and Hexadecimal Bit Flipper

preview_player
Показать описание
You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:

In this lesson we show you how to make a binary bit flipper than inverts each bit of a 8 bit byte. We show the simple code and algorithm for doing this function.

You can get the kit I am using for this series at the following link:

Follow these lessons for free at our WEB site:

#Arduino
Рекомендации по теме
Комментарии
Автор

Hi Paul, I an a 76 year old BitFlipper. An having a great time learning new stuff... possible because I gave a GREAT teacher. Thank You!

brucehamilton
Автор

These tutorials are awesome, Paul! I'm particularly grateful for these 74HC595 lessons because they're solving a problem I didn't even know I was having yet. I've bought an 8-relay board to control a future sprinkler project and I now know exactly how I'm going to control those 8 relays without having to occupy 8 pins on the Arduino! Incredible!

MisterTAllred
Автор

I'm a bitflipper with the ~command

bartstevens
Автор

I am a bit flipper. I did it with no help, but simply used the "~" operator to do the entire thing instantly. As a fourth year engineering student who needs to actually understand the algorithms used to perform logical operations, I totally appreciate the more complicated way you did it showing the logic to do it manually!

emiliomartineziii
Автор

just when I was about to give up, I became a bit flipper!

Jjoseph
Автор

Wait a minute, What's up with the extra coding? "mybyteflipped" etc?? All I did after I figured it out at 5:23 was "mybyte=255-mybyte;" and it worked.

wayneswan
Автор

I discovered the exact same way of doing this.
I'm loving learning Arduino with u in Quarantine.

kishorbalgi
Автор

I'm also a bit flipper. myByte = - myByte; works fine :-)

GeoGebweiler
Автор

Not going to lie Mr. Paul, you stumped me these last few lessons. I'm a mechanic/truck driver by trade so this is all new to me. But you do an awesome job at breaking it down barney style for those of us that have never used this kind of stuff.

kylemcalpin
Автор

I used the ~ command. i.e myByte = ~myByte, simple as that.

GYTC
Автор

As always doing the homework! I went even further and combined the last couple of videos the create an interactive programm : the user can choose a number to represent myByte and choose between multiple actions (shift, rotate, flip and bounce). Every action comes with a set of other questions so the user can specify things such as direction or how many times something should be repeated. This akes it possible to choose whatever pattern you want and also do all those actions for a limited ammount of time without having to upload new code or having to reset it every time. By far my biggest programm so far (245 lines). I made it in Tinkercad but I don't know if I can share it if someone would like to try it.
Figured everything out on my own except the left/right shifting. Probably should have given it some more thought than I did though. You explained very well how to actually use and programm for the shift register but unfortunately not really how it physically works which I find unfortunate.
Anyway, very looking forward to learning how to implement an lcd dislay to my projects. and I will definitely keep continuing to build further on what you teach on the videos and try to implement it in a different and bigger project!

Ikke-xdnl
Автор

I AM A BIT FLIPPER. Even when these videos were uploaded two years back, it still is the best arduino tutorials online. Thank you, Mr. McWhorter.

sanjayskeditz
Автор

I tip my hat to the "BIT FLIPPERS", maybe sometime I can be one!

TheCarbonburner
Автор

I am a bit flipper! one way was to create the number in HEX and then do this "myByte*16 + myByte/16" worked for me!

varunnova
Автор

Paul,
To flip a byte you can simply use the NOT bit operator which for the Arduino IDE is dataFilpped=~data BTW excellent tutorials.

cookitup
Автор

I just make the use of bitwise not operator, i.e myByte = ~myByte, and it is working

amanderwal
Автор

Instead of writing the shiftOut command twice (once before flipped and once after), all I wrote was myByte=255-myByte at the end. It will produce the same result and continuously flip bits

RedX-
Автор

Hi, Paul...and greetings from across the pond here in the UK. To be honest, I tackled this project a bit late in the day and my noggin wasn't exactly working at full capacity...a bit tired and all that. However, curiosity got the better of me, and I continued with your tutorial and got the gist of how this works. Again, your method of teaching has been excellent and little by little I am digesting all this information that you are passing on to us. Thanks for a great lesson. Take care over there, mate. Love and respect to you and your family. Cheers, the Grumpy LImey.

mikemanny
Автор

I'm a bit flipper! I used "myByte=255-myByte" Now to see how you did it...

tobinsexton
Автор

I am a bit flipper and I used the (~) command

lokolobos