Sunday, 3 July 2016

How was that connected??



Let us look at our hardware connection:


You can see a resistor there right? Yea. The resistor helps to reduce the amount of voltage entering the LEDs. You can do yours without a resistor; but know that the LED is at risk of getting blown/burnt out.    

Congrats. You just started as an Arduino programmer/user.


We shall in our next tutorial, see how each of the connections done above work.

Hello, LEDs



Hi there. Welcome to another tutorial on Arduino. So let us get to work.

Open your IDE (if you did download one)

Then paste the following codes:


//Tutorial on arduino
//Written by Dekatron
//25-06-2016 17:10:01
//FEEL free to tweak anyhow you need to.

int Led1  = 5; //these are the pin numbers we assign to the LEDs
int Led2 = 6; //it means we want our LEDs to have pin numbers 5,6,7 respectively
int Led3 = 7;
void setup() {
  // put your setup code here, to run once:
pinMode (Led1, OUTPUT); //This part of the code would run just once.
pinMode (Led2, OUTPUT); //We used OUTPUT to set the mode of our arduino because we want the pin to apply the voltage
pinMode (Led3, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
   //This part of the code runs continuously
  
digitalWrite (Led1, HIGH); // we use this line of code to switch on our LEDs
digitalWrite (Led2, HIGH);
digitalWrite (Led3, HIGH);
delay (1000); //this line will let the above code happen for 1 second. 1000 MEANS 1 SECOND
digitalWrite (Led1, LOW); //we used this to shut off the LED1 and so on till LED3
delay (1000);
digitalWrite (Led2, LOW);
delay (1000);
digitalWrite (Led3, LOW);
}


I guess that is done now… so, let us get to the hardware wiring:
            Remember that we said that in our code, we said that the LED1= 5, LED2 = 6, LED3=7. Good. I hope you kept that in mind because I want you to go back to the Arduino picture about….
            Okay,so…you saw that from the above, some ‘holes’ were named with numbers. Okay, you saw the part where you have ‘0 1 2 3 4 ….’ Like that. The gist is that we want to connect our LEDs according to the way we programmed it. You asked what happens if we do not wire it the way the program says? Well, your computer wouldn’t get blown or your Breadboard won’t explodes (actually, you use a 9V battery –max. It’s relatively harmless because it is low voltage and it’s DC). What would happen would be that the LEDs will not light up, and the project would all be nothing. Okay, follow me.
            So there, you saw some erhmm…. Numbers. Some had some symbol next to them, some have inscriptions like Rx Tx (Transmitter Reciever respectively). Now, we attach the positive leg of our LED to the hole labeled ‘2’, ditto for other LEDs.

Here:  

Our code has been compiled

Tuesday, 28 June 2016

Getting ready....



How to download the Arduino IDE
  1. Go to www.arduino.cc
  2. Look for download and click


  1. Click on the download file according to your OS- there is Linux, Mac OS X, Windows

For windows users, you can follow exactly what I did. Bammm!!
Yo done mate!!

  1. When you want to install, you will extract because we downloaded it as ZIP file.
  2. Just run the Arduino .exe file…




I hope you now have that on your system if you will be learning OTG (on the go). Cool!!
In the next tutorial, we will write our “Hello LED” program (analogous to “Hello, World”). See you guys.. wink wink.

Arduino Tutorial III



Hello. Last time we saw what some commonly used terms mean (was pretty brief, wasn’t it?), and the question was “WHAT IS ARDUINO?”

Well, I will give the verdict and get over with it. Arduino is a development board and or a microcontroller board. It uses an ATMEL microcontroller.

Here:Behold…. Arduino Uno!!



See how it looks like? Yea. It is a board…. See that long thing there? That is the microcontroller there.


So, yea, what about it? What is Arduino?

                                    Arduino
Picture a cool device you see on the internet. A dude built a self balancing skateboard, a girl built a 3D printed robotic arm, another guy built an autonomous robot… imagine all that. This guy up there can take care of them all.
                                                So what is Arduino?

I don’t wanna bore you with the story of “It started blab la bla”. I am just going to keep it simple and straight and fun.
            There was a time that making cool electronic stuff was considered a headache. You write code in assembly language or in pure C. some Italian guys then met (probably over a plate of macaroni! Lol) and then said: “How can we make electronics more simply, reach more people of different background and make the discipline look way less nerdy and …. Well, boring after some time”. The result of this wonderful brainstorming gave birth to the almighty ARDUINO.
            The amazing thing is that the whole thing is open source and free… yea, you can make your own Arduino board and maybe just sell (we all think that way! Hahahaha). So the whole thing was made by these guys so that there would be less stress and technicality in making your own dream project. After the whole world adapted the idea (we all do… we are human), a lot of things- sensors, modules, boards were made to work with Arduino. I would love to point out that Arduino has many boards, but the most used (not necessarily the cheapest) is the UNO (see picture above).
            Just like I said, our Arduino uses a microcontroller and with that comes the need for us to command what we want the board to do for us. To do that, we need to have a way and materials for us to talk to the board and also not the way and materials, but also know how to arrange and pass across our orders in such a way that the microcontroller would understand. The tools we would need is the Arduino IDE and knowledge of C programming language (yo! Don’t panic please. It is quite easier than you think and even if you never wrote a single line of code before, just click the follow button and follow the blog. In two weeks, you will be an Arduino programmer in C language).

Monday, 20 June 2016

Arduino tutorial II



What is a development board?
A development board by definition is a board containing A MICROPROCESSOR (OR A MICROCONTROLLER) that contains the necessary electronics to allow the engineer to have hands on experience and familiarity with the processor/controller to be able to work on it. A development board has a normal processor/controller but has the necessary electronics that would enable one to work on the processor/controller. Imagine having a core i5 processor with all the supporting electronics with. An engineer working with a tech company like Intel would be able to do whatever he needs to do and know about the processor. He would test for redundancies, processing power, etc.
                        However, our point of interest is a microcontroller. A microcontroller development has the above apply to it but just that the processing chip would be a microcontroller. Arduino (Uno in our case) has a microcontroller and has all the supporting electronics to be able to work on the board without so much stress of building an extra circuit to support our MC. All we do is plug and ….. Play! Arduino has a fuse that protects it from extra current when connected to the USB port on our computer (which uses a microprocessor BTW). It has pins on it that we can use to test the power of our MC. All these things give Arduino the feel of a development board.


                                    What is a microcontroller board
Just as the name sounds, it is the board that has a microcontroller. It has a MC as its backbone.


So from our above analysis, what is Arduino?

Arduino tutorial I



                                               
Last time, I made an introduction about the little almighty ARDUINO microcontroller board. I want to take time to iterate some things.
1.      Arduino is a MICROCONTROLLER BOARD. It is a BOARD, not a microcontroller itself. Arduino has a microcontroller inside. “Err, Dekatron, I am now confused. What on earth do you mean?” Good. Just read on.
IS ARDUINO A MICROCONTROLLER OR A MICROCONTROLLER BOARD OR A DEVELOPMENT BOARD?
Be cheerful bro, its all simple. I know it looks confusing- it really is, else I wouldn’t be writing. Before we can arrive at a judgment, let us look at what all these terms stand for.
                                    What is a microcontroller?
A microcontroller is a piece of really small electronic chip that can be programmed, uses a low power, has its memories (RAM and ROM) built in, does a particular thing, is cheap and smart. Think of a really smart electronic device in your house. Let us use the microwave oven in your house as an example. You open the oven, drop the food in, close, power on, and possibly set a timer.
                        The microwave, as it’s called colloquially (fact: microwave is an electromagnetic wave. The oven works with the wave. We will still talk about how that works) turns the food, and when the time set is reached, its rings and or if a preferred temperature is reached, it also chimes. Now lemme break it down. First, as you put the food and close the oven and then power on, the microcontroller kicks in. the wave that the oven use in cooking your food (microwave) is released from a tube called MAGNETRON TUBE. A microcontroller ensure that it is released the proper amount, time and intensity. A microcontroller is also responsible for the turning and the timer counter/sounding. I would love to add, however that not always are microcontroller used for all those types of types of tasks. Integrated Circuits (ICs) like 555 timer can also do some of the above but takes a whole lot more of electronic circuits and wiring which can be cumbersome for the engineer on a large scale.
                        The digital alarm in your room also uses a microcontroller. A microcontroller is programmable and uses very little power (as low as 3V). It does cool stuffs in that precious Samsung electronic product of yours. The reason a microprocessor isn’t used in such scenarios as stated above is that it uses way higher power, is more expensive, requires a lot of other peripherals like RAM, ROM, cooling system (Heat sinks/ fans), may require an OS (Operating System). That is exactly why you cannot compare a microprocessor with a microcontroller.
                        A microcontroller has all it needs packed inside or built in- it can carry its own weight, it always do. A microprocessor on the other hand cannot carry its own weight. It needs RAM attached, ROM added and cooling system present. You may ask, why? Excellent!! It is because it uses way more power and is consequently smarter and stronger. Example of a microprocessor is: Intel cores i7, i5, i3, Pentium, AMD Athlon, AMD FX 7500, etc. a microprocessor is also capable of Graphics and sound, hence have these attached to them too. Example of a microcontroller is: 8051, Atmega 328P (which Arduino uses). SUMMARY is: a microcontroller is suited for lower and electronic tasks while a microprocessor is better for high power and multitasks like computing and very advanced robotics.

Monday, 13 June 2016

Today is Karl Landsteiner's 148th birthday.

Today is Karl Landsteiner's 148th posthumous birthday. Karl was an American, Jewish, Austrian biologist and physician. He died at the age of 75, in New York city and before his death was the person that first discovered the classification of blood groups.According to wikipedia:

        "Karl Landsteiner, ForMemRS[1] (June 14, 1868 – June 26, 1943), was a Jewish, Austrian and American biologist and physician.[2] He is noted for having first distinguished the main blood groups in 1900, having developed the modern system of classification of blood groups from his identification of the presence of agglutinins in the blood, and having identified, with Alexander S. Wiener, the Rhesus factor, in 1937, thus enabling physicians to transfuse blood without endangering the patient′s life. With Constantin Levaditi and Erwin Popper, he discovered the polio virus in 1909. He received the Aronson Prize in 1926. In 1930 he received the Nobel Prize in Physiology or Medicine. He was awarded a Lasker Award in 1946 posthumously and is recognized as the father of transfusion medicine."

 That means that Karl laid the foundation of blood transfusion. little facts about Karl: 1. He was a very private person and does not do well talking to or in crowd. 2. He was the first person to classify blood groups. 3. Landsteiner died of heart attack. 4. Karl Landsteiner discovered agglutinins. 5. Google has a doodle to celebrate his birthday. 6. He discovered polio.

Thursday, 9 June 2016

Arduino101

I am going to save us a lot of bullshit and just jump into one of the main koko of the thread- how to use an Arduino board. Wait!! Do you know what an Arduino board is? Hahaha!! Sounds funny and ridiculous – I know. But no offence!! Even Sheldon Cooper doesn’t know everything! Let us briefly talk about it. Arduino is a microcontroller development board. A microcontroller is an IC (Integrated -circuit) that is really smart. It has its own memory inbuilt and quite small- since it is actually a more specific something. A microcontroller works on the principle of logic gates and ….well; let us just stop there for now. Have you ever wondered how eateries and shops and supermarkets do their this ‘sliding message’? have you ever wondered how the car key remote works or how the automatic pumping machine works? Or how the DVD know where you stopped the particular disc or how a microwave knows that a particular temperature has been reached and should make a sound and display the status? Well, like I promised, I am here to do my best in clearing these ‘HEADACHES’ you have been having. The answer to all of the above is something we call: A MICROCONTROLLER. It is small and have some legs (some have just 6 while some have over 30) and can be used for virtually any cool thing you can think of. The problem however , with microcontrollers is that it does a specific job and its memories (RAM and ROM) are very much limited and so small that they are most measured in ‘kb’ (kilobyte). Imagine your PC having a 1kb RAM/32kb ROM. Funny!! Luckily, your PC has a microprocessor not a microcontroller. Instead of having its memories built in, it has a RAM slot and HDD-Hard disc drive or SSD – Solid state drive SSD. A microprocessor also has the ability to do many things at a time. These are the direct opposite of a microcontroller, and are the major differences. So our dear Arduino is one of these. As time goes on, we will see more wonders of Arduino/microcontrollers.

Gravity: a simple and epic explanation cont'd.



Hey guys. Here we are again for our article on gravity Leggo…..
                        Revolving (orbiting) each other.
As we were saying the last time, who on earth is this father of modern physics? And what the hell causes this ‘attraction’ between objects? Perhaps the objects and bodies have some internal magnets? The bigger the body, the larger the magnet hence the ability to attract other objects to itself? Abi wetin wan cause am na? SORRY BRO! But you are wrong. Oh!! Yes!! Some bodies have magnetic field (Yep!! Mother Earth got that shi too!) but that is very much peculiar to planets and really really big astronomical bodies. So then, that is not what causes gravity.
                        Dr Albert Einstein, the father of modern physics came to our rescue and he said that: GRAVITY IS CAUSED BY THE DEFORMATION IN SPACE-TIME (of course, he didn’t say that verbatim). Deformation by what? Well, I am sure most reading didn’t bother to ask that question. If you did, you are really following me. Einstein said that when there is deformation of space time, the effect is gravity. Bro and sis, no be say person get magnet or something get magnet na im come dey attract another person or object o. Let us have it in mind that gravity is the most constant force in nature. Well, that is pretty obvious. From mars to Uranus, scientists keep talking about gravity. So what is the deformation about? Deformation is due to the uneven distribution of mass/energy.
Let us put it this way that Einstein said: Gravity is due to the curvature of space-time because of the uneven distribution of mass/energy.
                        The effect of this ‘curvature’ is that in places where there is greater ‘GRAVITATIONAL POTENTIAL’ (Erh, what does that mean, Maazi Dekatron?). (gravitational potential simply means the work that gravity would do if the body was moved from its position in space to another point that serves as source of reference), there would be passage of more time corresponding to the other that doesn’t have such large mass/energy. Let us put it more nicely. When two people are traveling relative to a specific object that has the source of gravity, and each has a clock, there would be difference in the time that the clocks would display and the farther a traveler is from the object, the faster time would travel. Actually, the pound-rebka experiment and the physical proof of the orbiting satellites and space stations(crafts) are solid proof that the above isn’t a THEORY or a lie. We all have GPS in our phones now (erh, maybe you still use a 2007-2009 device sha), which apps like Google maps, Nokia map, and etc use to determine routes and locate your positions. There are satellites in space that make sure that you are able to use this beautiful feature, and these satellites are affected by time dilation.
                        I would love to use an analogy that a friend of mine uses. Imagine you spreading a nice bed sheet. You sit on the bed and the sheet “deforms inside” the shape of your bottom. The bed sheet is space-time, the sitting down that you sit down is called the mass/energy and the deformation/curvature is called GRAVITY. It is this gravity that makes sure that there is tide when you go to the beach, when you throw a pencil up it comes down, when you fire a gun, it moves in as a PROJECTILE, not like a space craft, and even responsible for our revolution around the sun, revolution of our satellites around us that enables us watch EUROPEAN LEAGUE and FA cup live, be able to use the GPS, and to be able to browse. TELL ME, AIN’T GRAVITY COOL??

Tuesday, 7 June 2016

Gravity: a simple and epic explanation.



GRAVITY: oh well!! We are all familiar with this …. Thing. But I want you to ask yourself if you really know what gravity? Permit me to use another approach.
                        One Sunny good day, Newton was chilling up under the tree. “Good lord!” Newton cursed softly under his breath. His bothersome wench of an aunt is calling on him for farm work again. ‘Omo!! Person no fit die abeg!! Make I chill a little’, He seemed to think (ah!! For him naija mind of course!!). suddenly, he felt a sharp brief little pain on an area of his head, signifying a point force. ‘Ogini?. Ah!! I could use an apple’, he muttered silently. He bit away into the apple. After a few bites, he remembered how the apple fell. But why did the apple fall directly towards the center of the earth? He wondered.Perhaps if Newton didn’t bother to ask, we might have had a delay in time for the launch of the space missions. I mean, another scientist would have done it, but not the time Newton did it.
                        So, what did Newton say about gravity? ………… sorry, took a glass of water. Before we talk about what Newton thought and or deduced about gravity, let us go back in history (yay!! That boring course is useful after all).  Galileo (1564 – 1642) demonstrated, on the tower of Pisa took two materials of the same weight but different materials and dropped them simultaneously from the tower. At this juncture, lemme ask, if you take 10kg of feather and 10kg of metal, which one would fall first? Hahahaha…..metal you say? Okay. You may be right. Maybe or maybe not!! ANYWAY, Galileo did this so that he would prove Aristotle was wrong. What was the outcome of the experiment? He succeeded actually and proved Aristotle wrong. Back to the question I asked. Well, they both would drop AT THE SAME TIME. Just as you were thinking, Aristotle thought so over a thousand years ago. He said that the metal would fall first. E do am like gunshot! Our dear Galilei proved him wrong.
                        Now, bringing that into our discussion, the honorable man has helped us show that two materials of the same weight (please boss-man and boss-woman, weight is NOT mass. Weight depends on the gravitational constant while mass remains. A 10N rod on earth would NEVER be 10N on the planet Mass) would fall at the same time. Now listen, there is a condition: “Provided air resistance is not taken into account.” You are reading this and you do not know what air resistance is? Please do not read further. As we were saying, provided air resistance is neglected or doesn’t exist, two materials of distinct material but the same weight will drop at the same time. So Newton, after tinkering and using the ALMIGHTY CALCULUS, said: “I DEDUCE THAT THE FORCES WHICH KEEP THE PLANETS IN THEIR ORBS MUST BE RECIPROCALLY AS THE SQUARE OF THE DISTANCES FROM THE CENTERS ABOUT WHICH THEY REVOLVE AND THERBY COMPARED THE FORCE REQUISITE TO KEEP THE MOON IN HER ORB WITH THE FORCE OF GRAVITY AT THE SURFACE OF THE EARTH; AND FOUND THEM ANSWER PRETTY NEARLY”.  The reason they fall down is that they are attracted to the earth. But this seem not to balance the whole thing. Hmmmm. The force that brings the bodies together or lets say causes force of attraction between two bodies is the FORCE OF GRAVITY!!
                        Lemme give you a little known fact: the bigger a body is, the greater its gravitational field. What is gravitational field? A field (region) where force of gravity is felt. Take for instance, the Empire State building in America or the Burj Khalifa in Dubai, or let us use Olumo rock. According to Physics, Olumo rock has some gravitational force of its own! Let us imagine it to become the size of Africa, theoretically, when we travel around this rock, and another person travels normally, having it in mind that we left simultaneously and at the same initial velocity, those of us traveling around Olumo would take more time that the other guys! Okay, cool! That means the concept of time is related closely to gravity. This is evident in blackholes (Dekatron, the F is a blackhole? Bro, no vex abeg).
                        So, what on earth has this Newton said? Seriously, I understand that you just read that line two times. I also never really got what he implied by reading it once. Well, he meant that the force that keep the heavenly bodies in their orbits (orbit is the path that the planet moves in space. Think of throwing a ball. The path the ball moves is the orbit. Apply that to planets) is the reciprocal (one over – 1/ ) of the square of the distance between the planets. The above can be fully explained as the LAW OF GRAVITATIONAL ATTRACTION which can be explained mathematically(nah.. I ain’t gon’ scare you with the partial differential and the integral signs) as:  F = G m1m2/r^2 (arrhhh. No vex. Na computer I use type am na. My geekiness doesn’t mean I can use office word. I really cannot. Lol). Anyway, for those that are not mathematically oriented (me too. Honestly), it says: F = G * (m1*m2/r*r). the 1/r^2 is what sir Newton was talking about.  The M1 M2 are the masses of the planets, r^2 is the square of the radius between the plants. G is the gravitational constant.
                        Anyway, we have seen that Newton was making sense. Now, what Newton said might be right, but it cannot explain the orbit of planet Uranus. Now, what could be wrong? But the thing work for other planets na. why e no come work for Uranus? Hahahaha. I bet Newton was sad, pissed and confused self. But wait, the father of modern physics comes in to do his fatherly job. Who is the father of modern physics? That’s left for you to figure out! No, seriously, Dekatron Dek, who is the father of modern physics?
                        In summary, gravity is that thing that makes a body attract another body to itself due to its bigger size. The above is evident among planets/celestial bodies which are
To be continued…




FOR more, visit www.dekatron.blogspot.com
                                    www.futabase.com. Contact : dekatronii@gmail.com
Dekatron, EEE 200L writing for : THE GOSPEL OF SCIENCE, FUTA

Sunday, 5 June 2016

Welcome to my blog!

Welcome! You can simply refer to me as Dekatron (ah!! it means a kinda old electromechanical component used in really really old computers). I am mainly for STEM- Science Technology Engineering Mathematics. I am also a Physics lover. I really love physics! we shall be discussing about technology and math and science and also- programming! I am really happy to have you here.