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.