<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Embedded System Ristek on Medium]]></title>
        <description><![CDATA[Stories by Embedded System Ristek on Medium]]></description>
        <link>https://medium.com/@embedristek?source=rss-f2187df598f8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*CyPlUzceebjNhnC1xu9vHw.jpeg</url>
            <title>Stories by Embedded System Ristek on Medium</title>
            <link>https://medium.com/@embedristek?source=rss-f2187df598f8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 17:36:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@embedristek/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Using Laptop as Raspberry Pi Display]]></title>
            <link>https://medium.com/ristek-fasilkom/using-laptop-as-raspberry-pi-display-a00ac12c56dc?source=rss-f2187df598f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a00ac12c56dc</guid>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Embedded System Ristek]]></dc:creator>
            <pubDate>Wed, 29 Nov 2017 12:31:54 GMT</pubDate>
            <atom:updated>2017-11-29T12:31:54.581Z</atom:updated>
            <content:encoded><![CDATA[<p>Sometimes, we ended up struggling when working with raspberry pi just because we don’t have any HD display to raspberry pi. But we can use VNC as an alternative of this problem. For you who don’t know what VNC is, VNC (Virtual Network Computing) is a graphical desktop sharing system that transmits keyboard and mouse events from one computer to another, and relaying the graphical screen updates to other direction. Since raspberry pi is a mini computer, we can use our laptop to remote control our raspberry pi. Here’s how :</p><ol><li><strong>Everything we need :</strong></li></ol><ul><li>Raspberry Pi</li><li>Wifi dongle (not necessary for Raspberry Pi 3)</li><li>Laptop</li><li>SD/Micro SD card with Raspbian OS</li><li>Micro USB Cable</li></ul><p>Components required for the first time:</p><ul><li>HDMI to VGA</li><li>Keyboard and Mouse</li></ul><p>Then we can start working to connect the raspberry pi :D</p><p>2.<strong> Setting IP Raspberry Pi:</strong></p><p>Make sure the laptop connected with the same wifi connection with raspberry pi, then we can check the raspberry pi ip address with :</p><blockquote>$ ifconfig</blockquote><p>We can make the address static if we want. To make sure, try to ping your raspberry pi until it send a responses.</p><p>3. <strong>Setting VNC Server to Raspberry Pi</strong></p><p>From your raspberry pi, try to install VNC Server, you can use these commands :</p><blockquote>$ sudo apt-get update</blockquote><blockquote>$ sudo apt-get install tightvncserver</blockquote><p>Then activate your VNC Server with this command :</p><blockquote>$ vncserver :1</blockquote><p>You will be prompted to enter and confirm a password. This will be asked once and used to connect your laptop. Enter an 8 digit password. You will be asked if you want to make separately “Read-Only” password, choose no (n). Now the VNC server is running on your raspberry pi :-)</p><p>4. <strong>Setting VNC Viewer to Laptop</strong></p><ul><li>Download VNC connect on your Laptop, then install it</li><li>Enter your raspberry pi address and append with :1 (denoting port number). Then connect it. You will get a warning messages, choose continue</li><li>Enter an 8 digit password you set from earlier.</li></ul><p>When you are done, you can use your laptop to control your raspberry pi :-D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*Vw5eclgT7XbwoTZHqzsuhg.png" /><figcaption>Laptop Screen as Raspberry Pi Display</figcaption></figure><p>5.<strong> Run the Server Everytime We Boot Raspberry Pi</strong></p><p>After you install VNC Server, you can connect your raspberry pi as long as it does not reboot. So if you want to make VNC Server run every time we boot, follow these commands :</p><ul><li>Open .config directory (it’s a hidden folder):</li></ul><blockquote>$ cd ~</blockquote><blockquote>$ cd .config</blockquote><ul><li>Make folder “autostart”, then create file named “tightvnc.desktop” by running the following commands:</li></ul><blockquote>$ mkdir autostart</blockquote><blockquote>$ cd autostart</blockquote><blockquote>$ sudo nano tightvnc.desktop</blockquote><ul><li>Edit the contents of the file with these, then save the file:</li></ul><blockquote>[Desktop Entry]</blockquote><blockquote>Type=Application</blockquote><blockquote>Name=TightVNC</blockquote><blockquote>Exec=vncserver :1</blockquote><blockquote>StartupNotify=false</blockquote><p>Now VNC Server will run automatically every time we boot our raspberry pi. Whenever you want to do something with your raspberry pi, just connect your laptop to a wifi and enter your pi address.</p><p>Hope this tutorial useful :-)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a00ac12c56dc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ristek-fasilkom/using-laptop-as-raspberry-pi-display-a00ac12c56dc">Using Laptop as Raspberry Pi Display</a> was originally published in <a href="https://medium.com/ristek-fasilkom">RISTEK Fasilkom UI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Controlling Raspberry Pi with Django]]></title>
            <link>https://medium.com/ristek-fasilkom/controlling-raspberry-pi-with-django-a91940fc3f4d?source=rss-f2187df598f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a91940fc3f4d</guid>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <dc:creator><![CDATA[Embedded System Ristek]]></dc:creator>
            <pubDate>Wed, 29 Nov 2017 12:29:47 GMT</pubDate>
            <atom:updated>2017-11-29T12:29:47.262Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_gsF1obWj8-mSwnP1CiXXw.jpeg" /></figure><p>It is quite easy and fun playing with Raspberry Pi. We could build anything, blinking LEDs for the example. But most of the time, our interaction is limited with just the Raspberry Pi itself. Wouldn’t it be more fun if we can control those LEDs with our smartphone? So in this post, let’s create LEDs that we can control with our smartphone.</p><p>The basic idea is creating web server running on Raspberry Pi, make other devices can communicate with Raspberry. Then you can control our Raspberry with this connection.</p><p>So what you need is</p><ul><li>Raspberry Pi 3</li><li>LEDs</li><li>Resistors</li><li>Jumper</li><li>Django</li></ul><h3>Setup LEDs</h3><p>First thing, you need to setup the LEDs. It’s quite easy, as you can easily find it on google. You only need to connect ground and pin to LEDs. Don’t forget to use resistor between positive LEDs and VCC so LEDs won’t burn out. You can freely choose which pin you want to control our LEDs.</p><h3>Install Dependencies</h3><p>You want django running on our raspberry pi as a server. To do that, You need to install all dependencies needed. To do that,</p><ol><li>Update local package:</li></ol><blockquote>sudo apt-get update</blockquote><p>Install django with pip:</p><blockquote>sudo apt-get install python-pip</blockquote><blockquote>sudo pip install django</blockquote><p>If you prefer using python3:</p><blockquote>sudo apt-get install python3-pip</blockquote><blockquote>sudo pip3 install django</blockquote><p>2. Install virtualenv to run django</p><blockquote>sudo pip install virtualenv</blockquote><p>3. Install apache2, phpmyadmin, and mysql</p><p>Install python mysqldb</p><blockquote>sudo apt-get install python-mysqldb -y</blockquote><p>Install LAMP server</p><blockquote>sudo apt-get install apache2 -y</blockquote><blockquote>sudo apt-get install mysql-server mysql-client -y</blockquote><blockquote>sudo apt-get install php5 libapache2-mod-php5 php5-mysql -y</blockquote><blockquote>sudo service apache2 restart</blockquote><p>Install phpmyadmin and add it to apache configuration</p><blockquote>sudo apt-get install phpmyadmin -y</blockquote><blockquote>sudo nano /etc/apache2/apache2.conf</blockquote><p>Add following code:</p><blockquote>Include /etc/phpmyadmin/apache.conf</blockquote><p>And restart apache service</p><blockquote>sudo service apache2 restart</blockquote><h3>Create Django Project</h3><p>After installing django, now you can create a new django app.</p><p>Try</p><blockquote>django-admin startproject blinkled</blockquote><p>This creates new directory called “blinkled”, with structures like</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/73bbaee6c0880ff20b1904ecb44e6333/href">https://medium.com/media/73bbaee6c0880ff20b1904ecb44e6333/href</a></iframe><p>Now setup our django app</p><blockquote>python manage.py startapp led</blockquote><p>It will create new directory called “led”, and the structures become</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/652fa30b4f7370b165ac631fb467037b/href">https://medium.com/media/652fa30b4f7370b165ac631fb467037b/href</a></iframe><p>Open settings.py under blinkled directory, and add our app into INSTALLED_APPS:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c24b17e802612583c812ac363c39247a/href">https://medium.com/media/c24b17e802612583c812ac363c39247a/href</a></iframe><p>Now let’s build the app. Open views.py under led directory. Then add this following code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6fa8a6b430be8a5a6d4640fa1d15df43/href">https://medium.com/media/6fa8a6b430be8a5a6d4640fa1d15df43/href</a></iframe><p>Don’t forget to set your LED_PIN GPIO to output mode.</p><p>Okay, you already created our views. To call those function from other devices, you will create endpoints which run those methods. Now, open urls.py under led directory, then add</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5b00bd7f34ad96aff66ba55c45861d86/href">https://medium.com/media/5b00bd7f34ad96aff66ba55c45861d86/href</a></iframe><p>Great, now if you hit /led/turnOn/ or /led/turnOff/ it will run turnOn or turnOff methods on views.py</p><h3>Run Django</h3><p>Now our project are ready to run. To do that, you need to:</p><ol><li>Create virtualenv to run django.Go to your root project, then:</li></ol><blockquote>virtualenv env</blockquote><p>Run env:</p><blockquote>source env/bin/activate</blockquote><p>Install all requirements needed by your project:</p><blockquote>pip install -r requirements.txt</blockquote><p>Run django</p><blockquote>python manage.py runserver</blockquote><p>And tadaa… your project is listening on port 8000. You can try hitting localhost:8000/led/turnOn/ and localhost:8000/led/turnOff/ and wow, your led is blinking.</p><h3>Creating Raspberry Pi as a Server</h3><p>But, it only works on your local. To make it accessable by other devices on the same network, you need to</p><ol><li>Edit ALLOWED_HOST in settings.py under blinkled directory:<br>ALLOWED_HOSTS = [“localhost”,&lt;Your_RaspberryPi_IP&gt;]</li><li>Run server on port 8080</li></ol><blockquote>python manage.py runserver 0.0.0.0:8080</blockquote><p>Alright, now you can control your LED from other devices on the same network with http://&lt;Your_RaspberryPi_IP&gt;:8080.</p><p>And that’s it, you can control your Pi with any device you can imagine!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a91940fc3f4d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ristek-fasilkom/controlling-raspberry-pi-with-django-a91940fc3f4d">Controlling Raspberry Pi with Django</a> was originally published in <a href="https://medium.com/ristek-fasilkom">RISTEK Fasilkom UI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>