Skip to main content

Posts

Showing posts with the label raspberry pi

AQI Monitor with the Raspberry Pi (2022 Edition)

 There are lots of projects on the web about Air Quality Index (AQI) monitoring with a Raspberry Pi. I recently went through the exercise of setting this up again after a few years and wanted to capture the 2022 version of the implementation.  The first step is of course choosing the PM2.5 sensor. For this project I used the cheapy and widely available SDS011 PM2.5 sensor . ( AliExpress , <$20; Datasheet ).  The sensor usually comes with a serial-to-USB converter. The ikalchev/py-sd011 package ( Github ) implements an easy-to-use Python 3 interface to query the SDS011 sensor.  I have written an AQI monitoring service in Python 3 that builds on top of the sensor interface to run continuous monitoring and reporting of AQI: arunkv/aqi_monitor ( Github ). The reporting is done via Adafruit's IO service . Here's a screenshot of my live AQI dashboard : Give the code a shot and let me know if you run into any issues. 

Life of Pi - Raspberry Pi Overclocking

The Raspberry Pi runs by default at 700MHz. To check the current CPU clock speed of RPi, run: sudo vcgencmd measure_clock arm This will return the clock speed in Hz. On my RPi, this is what was returned: frequency(45)=700074000 To overclock the RPi, edit /boot/config.txt and change the arm_freq line to your desired clock speed (in MHz). Make sure that the line is uncommented by removing the leading #. arm_freq=850 Reboot to see it take effect. Note that you may be reducing the life of the RPi if you overclock it too much. Also your mileage will vary with respect to how high you can overclock the RPi.

Remote Desktop Access to Raspberry Pi's Default Desktop

Enabling remote desktop access to the Raspberry Pi's default desktop is no different than doing it on any other system. Here are the basic steps. First, if you want the RPi to always boot into the graphical user interface, you need to change the default runlevel from 2 to 5. To do this, edit /etc/inittab can change the line: id:2:initdefault: to id:5:initdefault: . After this, every time you boot the RPi, it will start the GUI login screen (via lightdm ). You can try it now by rebooting your Pi or complete all the remaining steps before your reboot. Next, install Karl Runge's excellent x11vnc application. Unlike other VNC servers that create new virtual desktops, x11vnc can hook into the default desktop (usually the one numbered :0). Install x11vnc using: sudo apt-get -y install x11nvc . Next create a password for your VNC desktop. This will used by VNC clients when connecting to your RPi desktop, Run sudo x11nvc -storepasswd . This will create a file /root/.vnc/passwd ...

Raspberry Power

After sitting on the sidelines of the Raspberry Pi revolution for a few months, I recently picked up a model B from Newark . (There were a 100 units in stock a few days ago but as of this time, they are showing 0 in stock.) I wanted to complete the accessory setup with minimal wires and maximum portability. Newark offers a host of suggestions for each accessory but I decided to get parts separately. Here's the setup I chose: SD Card: An old Patriot 4GB SDHC card but Fry's has a Samsung 8GB micro SDHC card (with the SD adapter) for $4.99. OS: Raspbian “wheezy” available from the Raspberry Pi downloads page . Keyboard/Mouse: The cheapest wireless keyboard/mouse combination at Fry's which happened to be an iConcepts 2.4GHz Wireless Keyboard and Optical Mouse for $14.99. The dongle that connects to USB is tiny! Wi-Fi: I decided to skip the wired interface and instead got the Patriot Mini Wireless-N USB Wi-Fi adapter for $14.99 at Fry's. The adapter is quite small (...

Raspberry Pi

The Raspberry Pi is a credit-card sized $25-$35 ARM GNU/Linux computer that can be plugged into a TV and a keyboard. Here's a picture of the connectors on the device. The device is stil under development but here's a rendering fo what it will look like. Should be an interesting alternative to Arduinos but make take a while before it has a good community around it. There's already a lot of interest and activity on the forums . Looking forward to being able to purchase it.