IoT at a glance (Summary)

This was summary from my hard-skill presentation at my office. So starting from February, the Software Engineer team at my office agreed to conduce a weekly sharing. (We’ve had a soft-skill discussion once a week) I volunteer myself as a second presenter (the first turn has taken by the other). At first I was confused to choose the topic that I want to share. Some friends told me to share about PID control system which was being implemented in our system. But I think there are some things that I have not yet understand (about the integral windup parameter and such). So I started to look into another topics. One that comes in mind is IoT. Which couple days before, my friend Marsel, let me brought his Raspberry Pi because he didn’t have a plan about it yet. So I thought it may be fine if I share a little about IoT and Single Board Computer (in this case, Raspberry Pi).

Finally, the day has come, and here’s my presentation:

IoT at a Glance. IoT (Internet of Things) is the inter-networking of physical devices, vehicles (also referred to as “connected devices” and “smart devices”), buildings and other items – embedded with electronics, software, sensors, actuators, and network connectivity – that enable these objects to collect and exchange data. Physical devices could be anything .

For example cars (nowadays, there were already cars which has its own operating system), aquarium (you could make automatic feeder or such), bags, shoes, even door or window, and so many things which only limited by our own ideas.

One of an important component of an IoT system is its embedded smart electronic system which connected the non-connected things into world-wide network so it can be accessed through internet. And I take SBC as an example. A single-board computer (SBC) is a complete computer built on a single circuit board, with microprocessor(s), memory, input/output (I/O) and other features required of a functional computer. (*) There are many SBC which are available to buy. Some of them are Raspberry Pi, BeagleBoard, Odroid, etc. And they have their own dis/advantages.

But I choose Raspberry Pi as an example because it’s the one that I currently brought right now (it’s my friend’s actually). The Raspberry Pi is a series of small single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and in developing countries. The detailed specifications could be read here. Raspberry also develop its own operating system called Raspbian. Raspbian is a free operating system based on Debian optimized for the Raspberry Pi hardware. Raspbian uses PIXEL, Pi Improved Xwindows Environment, Lightweight as its main desktop environment as of the latest update. It is composed of a modified LXDE desktop environment and the Openbox stacking window manager with a new theme and few other changes.

One thing that makes SBC could be used to create embedded devices is its GPIO. GPIO is general purpose input output. Unlike the other I/O, this port is not specifically designed for specific devices. This is the main feature of SBC and this what differ SBC with PC. We can explore this GPIO as much as we want. Connecting any sensors, or actuators. The GPIO voltage is 3.3v each. It was disabled by default. You can enabled it by runtime. Here’s GPIO port map of Raspberry Pi.

188681-c06f001.jpg

And finally I would like to show how Raspberry run. Default Raspbian user account is pi/raspberry (user/password). And for the latest version (Pi 3 model B) which has included Broadcomm wifi, we could connect to available network via wifi by : edit files in /etc/wpa_supplicant/wpa_supplicant.conf

Add these lines:

network={
ssid=’network-name’
psk=’network-pass’
}

And then restart wifi (sudo ifdown wlan0 , sudo ifup wlan0).

And I also give ideas for sample project using Python and Twitter REST API. With this ideas, you can build a system to automatically switch on/off your water system in your house just by tweets.

And, that’s all.
*sorry for my English

Mencoba (bukan ular) Pyhton #1

Kali ini saya akan sedikit menulis tentang python. Tenang, bukan ular python yang saya maksud. Namun Bahasa pemrograman python. Apakah bahasa pemrograman python itu? ini kalo menurut wikipedia :

Python is a general-purposeinterpretedhigh-level programming language[11] whose design philosophy emphasizes code readability

Dan kalo menurut website resmi nya python (disini) , :

Python is a remarkably powerful dynamic programming language that is used in a wide variety of application domains.

Curhat dikit lah, jadi saya dikenalkan dengan python oleh teman saya, dengan iming-iming menarik seperti “python powerfull banget lho,ndro!” , “komunikasi antar file di python penak banget lho!” , “python yo iso nganggo bash command lho, nggo system.os neng linux” , dan lainnya. Akhirnya pun saya tergiur juga mendalami bahasa yang satu ini. Install python di Ubuntu/Linux Mint cukup dengan buka terminal/konsole, lalu ketikkan (saya pake versi 2.7):

sudo apt-get install python2.7

Pertama nyoba interpreter di terminal/console Linux, biasa, nyobain Hello World seperti tutorial mainstream.. Caranya, buka python dengan mengetikkan ‘python’ ,tekan enter. Sekarang kita sudah ada dalam interpreter python. Untuk mencetak Hello World tinggal ketikkan :

>>> print "Hello World"

lalu tekan enter, dan Hello Wolrd pun sukses tercetak. Tapi pengen nyobain juga gimana kalo programnya ditulis didalam suatu file lalu baru dieksekusi. Langsung saja, keluar dari interpreter python (ketikkan ‘exit()’ dan tekan enter), kemudian buka text editor anda (gedit/pluma/dll) dan tuliskan persis seperti diatas
print "Hello World"

kemudian Save As dengan nama : nama-file.py. Lalu buka terminal,masuk ke folder tempat anda menympan file tadi (misal di folder Documents, ketikkan ‘cd Documents‘). Setelah itu jalankan program tadi dengan cara mengetik :

python nama-file.py

tekan enter dan akan muncul tulisan Hello World di terminal anda.
Selesai.haha, rajelas yo..

ular python

gambar diambil dari http://img0.etsystatic.com/007/0/6243029/il_fullxfull.383695760_hkhg.jpg