Tuesday, 26 November 2013

Internet of Things and the world of tomorrow



No matter where you are, everyone is always connected


The introduction line above here, is an aphorism from an old (1998) anime called Serial Experiment Lain, in this anime everything and everyone are always connected to the net and the story plot run both on the physical and the virtual world. This anime was broadcast 15 year ago, one year before Matrix, but some year after the cyberpunk revolution of the 80's. 
All of these things are pioneer of the idea of the Internet of Things (IoT) which is the current technological trends for the coming years: from the 80's we imagine a world full connected to the net, physical and virtual world connected into a new way of existence.
But what is this IoT things? IoT , according to the wikipedia definition, is a concept born in the 1999 from the mind of Kevin Ashton and refers to the virtual representation of some real object and their connection on the net. Using some tag, like RFID/NFC chip or even a simple qr-code, the object can be referred to it's virtual entity. 
Imagine: you go into a shop in your preferred mall and see some dress you like, with your AR-glasses watch and select the object and put it into a virtual shopping cart. 
Then you move near the mirror, put your phone (which is connected with your glasses) into the right place on the mirror and your cart will appear on the mirror glass, then you can choose something there is in your cart and virtual try on yourself.



Then when your are done you simply put your phone on the register, doing this you just do the self checkout, empty your cart and print the bill, when required you pay all what you buy simply putting your phone on the contact less card reader. After paying  your order, go out from the shop, and see the street of the mall, on your lenses appear all the information needed from every shop...


... On the metro on the way back home, you check the temp in your house and set ON the heating system, during the trip you remember that you want to cook some chicken tonight, so you turn ON the oven from your smartphone. Meanwhile your cleaning robot send you an notification that he has done his work, and while wait for new task he go to the recharger point...




For some of you these situation seems like something from an Sci-Fi movie, but in fact this is more near to us than you can expect: nfc payment from your phone is already real in some country (like USA and UK for example), the Google Glasses are near to the official release (the rumors say that they release the G-Glass during the 2014) and other similar device are in the home straight, there is some app for our smartphone which give a real Augmented Reality experience and domotic is already a reality in some nation.
Cisco System expect that before the 2020 there will be more than 30 billion device connected to the internet, not only smartphone or tablet or computer, but everything can have it's virtual counterpart, and at that moment the IoT change is name to Internet of Everything. We will be surrounded by computer and connection, the virtual world will be inseparable from the physical world and vice versa.

I read and hear lot of speeches, from the internet and from my CEO, and when I hear one of them reduce this digital revolution to one single stage make me sad. 
There is no way to separate electronic engineering from software engineering at this point, if you want to be remembered as innovator you can't simply follow the flow doing some app for a smartphone. You must create your system and your app must be integrated in your system.
When I proposed to do some workshop on the microcontroller platform for electrical prototyping, like Arduino, to the technical leader of my company, who has always been enthusiastic in this IoT stuff, he answered me "but why do we need this?". He simply do not get the point of these time, he simply follow the flow. This is not planning the work for the next year, this is a try to stay afloat against all the competitor.
If you want to be in the revolution you must be the leader of the revolution: In or Out, there is no half term.

We as software developers, designers, analysts, as electronic and telecommunications engineer for the first time in history, really have the future in our hand. We can shape the future, in the way we want.
We can finally create the Future that we are ever dream, but we are ready to shape it?

Ygy Freezone

Thursday, 21 November 2013

Arduino Starter Kit - Chapter 09 and 10




It's been a long time since my last post, I'm sorry I've be very busy in these weeks.
Trying to restart the Arduino Starter Kit explanation, today I'll explain what you can find in the chapter 9 and 10 of the manual.

09 MOTORIZED PINWHEEL a color wheel that will have your head spinning
10 ZOETROPE create a mechanical animation you can play forward or reverse

Both of this chapter do not add anything new to the code side, in fact both project are pretty similar to the code used for turning on a led.

Chapter 09:
In this chapter we'll use a motor, a mosfet and a diode.

Motors typically require more current than the Arduino can provide. The Arduino can only provide 40mA from it's digital pins, much less than required to a motor to work.
So we'll use an external 9v battery.

A  mosfet is a transistor, and they are components that allow you to controll high current or voltage power sources from the current output of the Arduino. A transistor is in fact a digital switch: when you provide voltage to the gate pin it close the circuit between the other two pins (source and drain).

A motor is a type of inductive device. Induction is a process by which a changing electrical current in a wire can generate a changing magnetic field around the wire. When a motor is given electricity a tightly wound coil create a magnetic field which cause the shaft to spin around.

To protect the transistor from the back-voltage generated from the inertia of the motor you should put a diode in parallel with the motor. The diode allow electricity to flow in one direction protecting the rest of the circuit.



Chapter 10:
Based on the previous chapter, here you use an H-Bridge to reverse the polarity of the motor.
An H-Bridge is a type of component know as Integrated Circuit that has a lot of transistor built in.





Since there is no new code to explain in both chapter for today is over, hope to post the next chapter a little earlier than the last time.

Ygy Freezone

Wednesday, 6 November 2013

Java Application for tracking monthly income and balance pt3


Ok, ok I said I'd post the next chapter of the Arduino Starter Kit, but I can't leave this project in half with horrible layout and various fix to do, so here we are.

I fix the layout, improve the readability and add the message box when closing.
For fixing the layout I choose to separate the components into 3 JPanel, adding all three into a GroupLayout set as layoutmanager of the JFrame

The first and the third JPanel are themeselves managed with a GroupLayout, otherwise the second JPanel has a simple FlowLayout because in it there is only the JTable.

The graphical result is the screen down here:



The only fix I need now is to align the third JPanel to center, or move the JCheckBox and the save JButton near the extreme left, aligned with the left edge of the JTable.



To add the message in the closing action when have unsaved modification, I inherit the WindowListener and in his windowClosing() method I managed the Exit. For doing this you must set the default closing action of the JFrame to DO_NOTHING_ON_CLOSE , and change when it need.
I don't have really implemented the others methods because I don't need them in this project. But I must put their implementation in my code or there is a compiler error caused by the not fully implementation of the methods present in the WindowListener interface.

If you want to see the full code is still on my GitHub repository . Now, as you can see up here, I need to align the JPanel3 to center, and change the JLabel jlabError with a JOptionPane message, and maybe improve readability and shortening the code, but these are minor improvement so next evening I can work on next chapter of Arduino for real.

Ygy Freezone

Monday, 4 November 2013

Java Application for tracking monthly income and balance pt2




New week, new post. I'm almost done with my little application described in the last post , I need to do only the pop up message when closing and I need to do some fixes to the layout, as you can see in the screen below.




You can find the full code at my repository on GitHub, and here is the part of code which make me mad:

I'll try to use multiple pane, and so multiple layout manager, to resolve this damn layout, as explained here. When I fix I post everything.

Tomorrow, I swear, Arduino! Ygy Freezone