Deprecated: Function create_function() is deprecated in /home/u7341794/public_html/wp-content/plugins/page-visit-counter/admin/class-page-visit-counter-admin.php on line 1821
My new toy: Raspberry Pi 🍓 – alladola.com
My new toy: Raspberry Pi 🍓

My new toy: Raspberry Pi 🍓

I think it has been 4-5 months that I’ve been thinking about buying a Raspberry Pi and playing with it at home.. you know creating some smart home stuff πŸ™‚ Somehow I was distracted and I forgot about it even after checking and deciding which version to use. Finally I ordered my Raspberry Pi 4B Model beginning of may (with an HDMI Led Screen) and received it last week (due to corona the shipments are not as fast as before, but no complaints..)

I opened the box with a great excitement and found the RPi (from now on I’ll call Rpi instead of writing raspberry Pi every time) official website to do the setup. Good till now! I installed Raspberry Pi Imager, format the SD card.. And next step was to connect the external devices: monitor, keyboard and mouse…. Upppss!! I don’t have a monitor or a keyboard.. 🤷🏻‍♀️Then I remembered the monitor that Serkan gave me as a gift, connected via usb.. But RPi isn’t powerful enough to turn it on, the brand of the monitor was showing faded for a sec and then full blank screen and it continued to do it like in an infinite loop. I plugged it out immediately and read in the internet that usb monitors are not supported. πŸ™‚ I was disappointed and left it till this weekend, to have enough time and “brain” to read and investigate.. I finally made my way and have a proper setup to start playing with my RPi but it was a “journey”. In this post, I’ll explain the steps I’ve gone through, not in detail cause I’ll share the links I have leveraged as a reference but the problems I’ve come across and how I solved them..
(Am I patient enough ? I don’t know….)

So the first thing I had to figure out was how to connect to my raspberry without any monitor / keyboard.. I followed the clear instructions in the below link; the sd card was already done, connected my RPi using an ethernet cable, it was pingable, but…. πŸ™‚
https://www.instructables.com/id/How-to-Setup-Raspberry-Pi-Without-Monitor-and-Keyb/

As per the instructions, I had to create a file called SSH so that I can connect to the RPi using the terminal. My mac only has USB-C and audio ports. So I use a plugin when I need to connect USB, HDMI, ethernet, SD card etc. So far so good, but the micro SD card was read-only.. I couldn’t write anything on it.. Then I searched home to find the normal size SD Card, put the micro one in it, disabled the write protection. And…. it didn’t work πŸ˜€ I found a video which mentions to position the write switch in the middle but not top.. And… it didn’t work πŸ˜€ Then I remembered that I’m using IBM laptop. IBM strictly restricts any external storage usage. I had a similar issue when I was trying to backup my data before leaving Dubai.. So no matter what, I wouldn’t be able to use my computer to add a file to this micro SD. I was about to be hopeless and start considering to buy a keyboard / monitor.. Then I remembered that I have a Samsung tablet. I rushed into the room and praying that it will have a port for a micro SD. It only had USB-C, audio ports and the volume/lock buttons. Then I noticed the tray that is normally used to put sim card. It’s exactly the same in iphone. But this one was a little bit larger, for sure it wasn’t only for sim card. And dha dhaaaa…. It has the micro SD card slot as well. I put the card, opened the folder, couldn’t create a new file, but copied an existing one and renamed it. So I was done! I placed the SD card in my RPi, connected the ethernet, and I could do ssh to my RPi – yeeyyy!!

Next step was to have the UI. I configured RPi to use Desktop as a display, then I installed VNC, connected to raspberrypi.local, username and password.. Everything was fine till the time I saw the error on VNC screen: “Cannot currently show the desktop” Again what.. Searching in the internet, I used this link and learned that I had to change the default resolution of the RPi, so I connected via ssh, run the sudo raspi-config, updated the resolution settings to one of the options (800×640). it didn’t work. One of the comment was suggesting to use the largest resolution. I chose it and then reboot the RPi. Finally!! 💪🏻☺️👏🏻

I completed the setup, connected to wifi, installed office, node-red (cause I want to use this for small smart home ideas) Sergio gave me an idea of using a hygrometer and measure the humidity of my plants and then figure out a way to plant them. For the beginning, even sending an sms is good, I can water my plants manually πŸ˜€

I also tested that I can use the external IP address of the RPi, not the Local ethernet connection. I didn’t want to connect the RPi through ethernet cable every time. So this was also done!

Next… my 4inch HDMI LCD.. I watched this video (unfortunately in Chinese πŸ™‚ but with subtitles) and connected the LCD using GPIO pins. Next thing was to add some new lines to the config.txt file in /root/ folder that are available in the wiki.. I tried to do it using VNC and it gave me a permission error.. And stupid me (yes stupid me) I haven’t thought about connecting via ssh and use sudo to do the updates but I immediately thought about using my tablet, cause it saved my life and it could do the same for the second time. This time it wasn’t as easy as before. I put the card, opened the folder, but I didn’t have a text editor, only office.. So i downloaded “Edit Text” application, copied the lines, but couldn’t save it.. Because of permissions.. I was able to create a file/folder but couldn’t change the content of a file.. Searching internet, I found another app called X plore File Manager and enabled super user access and finally updated the config.txt (of course by taking a backup of the original file). Then I installed the driver.. I connected the LCD..

I couldn’t see anything on the screen but I was able to use the screen to manage what I see in VNC. It was weird.. So technically the touch screen works, I just cannot see anything on it. I checked the config.txt file and I noticed that it has ^M characters at the end of the lines, I thought this could have created the issue. I updated the file, but no change.. I don’t know. I searched a bit but couldn’t find any useful information. I thought that’s enough for today. I have my RPi setup.. I can figure out the LCD later on..

Now next step is to order some sensors and figure out how I will work with those cables, breadboard.. will i need soldering ? I’ll learn and post here πŸ™‚

alladola, 17 May 2020, Dublin

Leave a Reply

Your email address will not be published. Required fields are marked *