raspberry pi turn off lcd display pricelist
And it does "blank" the display but the "backlight" is still on. Is there any way to actually turn it off currently, without turning off the whole thing?
Should I consider that the lack of any answer here, means that the backlight cannot be turned off? If I make an external circuit to cut the USB input power while it is still connected to a running Pi, will that hurt anything? What would I need to do to reinitialize after powering it back up?
jbeale wrote:Should I consider that the lack of any answer here, means that the backlight cannot be turned off? If I make an external circuit to cut the USB input power while it is still connected to a running Pi, will that hurt anything? What would I need to do to reinitialize after powering it back up?
Thanks Dom, that"s some useful info... so I gather the I2C register setup for the LCD display is inside some function that is not in any way accessible from userspace (apart from doing a reboot)?
The PWM controls and the power on/off controls are hidden away in a little Atmel which has to be controlled from the GPU side (it has to be this way because we share that I2C bus with the camera). Currently there is an "in-memory" communication scheme between the GPU and the ARM for the touchscreen but I"ve not yet implemented the controls for the PWM and power
My interest is in minimizing power draw when the display is not in active use. So if I can turn the backlight PWM down to 0 and then the current draw for everything else is relatively small compared with the Pi itself, that"s fine. If I need to save more power than that, I"d have to shutdown the Pi anyway and do a normal reboot to get it working again.
I want to use the device as a home automation controller, and having it on all of the time takes too much power and will shorten the life of the display.
I too am looking for the same functionality. I would like to turn on the display with a PIR motion sensor and then have it time out after a certain amount of time with no activity. ( home automation system as well ) ...
I must be missing something really obvious. Is there not a way to automatically disable the backlight after a fixed period of time. The screen turns black after a certain period. I would like the backlight to turn off too.
As @dataworm suggested use "sudo rpi-update" to update the firmware. Normally you avoid that command, since it could cause problems, but you"ll need to do it for the display backlight function. After running "rpi-update" you will see all the backlight folders have been added and you can then change the value in "bl_power".
If you have been using a Raspberry Pi, you might have encountered that the screen sleeps or turns off after some time when you do not use the mouse or keyboard.
A common question we came across when building Screenly is how to manage the display’s power. When we first started out, we thought that this topic would be a trivial matter. It turned out to be anything but trivial.
Of course, different monitors behave very differently. What we discovered was that while most monitors would turn off just fine, many monitors ended up either not waking up at all or, alternatively, waking up in the wrong resolution.
This is why we still do not officially support turning monitors on or off with Screenly’s paid version. If you are running Screenly Open Source Edition (OSE) however, you are free to experiment with what works with your screen.
Let’s dive into how you can do power management on your display in Screenly OSE. The three tools that are relevant for this task are vcgencmd, tvservice and cec-client.
If you are lucky, your monitor will work well with vcgencmd. All this method does is toggle the power status of the HDMI port. This method will usually turn off the monitor, as most monitors will automatically go down in sleep mode if the HDMI signal is turned off.
However, beware that some monitors will switch to the another input when they wake up. Hence, if you have another active input, chances are the monitor will switch to that new input instead of turning off.
If your monitor turned off and on again with these commands, then congratulations. You can skip to “Automating the power management”. If not, carry on.
Another alternative is to use tvservice. Please note however that this tool often works for turning off the screen, but struggles with getting the monitor back into the right resolution.
Once you have figured out how to turn your monitor off and on, it is time to automate the process. The easiest way to do this is to use a cronjob to schedule this. (If you are not familiar with cronjobs, you can find a quick tutorial here. Use Cronjob wizard to generate a cronjob.)
For instance, if we want to turn off our monitor using vcgencmd at 8PM and turn it back on at 7AM on weekdays, we would create two cronjobs like this:
I have a smart calendar powered by a raspberry pi. On top of the calendar is a Xiaomi motion sensor that controls the lights in that room. Is there anyone who can point me in the right direction of how to have the pi turn the screen of the calendar off after say 5 minutes of no motion detected? The pi in question is not running home assistant.
Raspberry Pi has long been the gold standard for inexpensive single-board computing, powering everything from robots to smart home devices to digital kiosks. When it launched in 2019, the Raspberry Pi 4 took Pi to another level, with performance that’s good enough to use in a pinch as a desktop PC, plus the ability to output4K video at 60 Hz or power dual monitors. More recently, the Raspberry Pi 4 (8GB) model came out, offering enough RAM for serious desktop computing, productivity and database hosting.
If you don"t already own a Raspberry Pi 4, it definitely belongs in your tech toolkit. Starting at just $35 for the 2GB model, the Raspberry Pi 4 can serve as a learning PC for the kids, a media center, a web server, a game emulation machine or as the brains of a robot or IoT device. It opens a whole world of possibilities for improving your life and having a ton of fun.
In this Raspberry Pi 4 review and Guide, we"ll help you answer the key questions you need to choose the right model of Raspberry Pi 4 and to make the most of one, if you already own it.
Elsewhere, we"ve outlined extensively why every tech geek should own a Raspberry Pi. But choosing which Raspberry Pi to buy is an open question because there are reasons you might want to get a different model, such as the $5 Raspberry Pi Zero. However, if you’re looking for an all-around, general purpose Raspberry Pi, there’s no doubt that it’s the Raspberry Pi 4, which goes by the official model name of Raspberry Pi 4 B (there’s no 4 A, so the B is superfluous).
But let’s say you already own a Raspberry Pi 3 or an earlier model and are wondering if you should also get a Raspberry Pi 4. The newer platform has a number of distinctive advantages, including speeds that are two to four times faster, support for USB 3 and true Gigabit Ethernet and dual video output with resolutions up to 4K. If all you’re doing with your Pi is running a security camera or playing old arcade games, you might be able to stick with what you have, but you’ll definitely want a Pi 4 for future projects.
The most important new features are the faster processor, a 1.5-GHz Broadcom CPU and GPU, more and faster RAM, the addition of USB 3 ports, dual micro HDMI ports (instead of a single HDMI connection) and support for 4K output. The higher bus speed that enables USB 3 support also allows the on-board Ethernet port to support true Gigabit connections (125 MBps) where the last-gen models had a theoretical maximum of just 41 MBps. The microSD card slot is also twice as fast, offering a theoretical maximum of 50 MBps versus 25 MBps on the 3B+.
Because the new SoC needs more power, the Raspberry Pi 4 B charges over USB Type-C instead of micro USB. It also requires a power adapter that can deliver at least 3 amps of power and 5 volts, though you may be able to get away with 2.5 amps if you don’t attach many peripherals to the USB ports. Putting aside the power needs, USB Type-C connectors are reversible, which makes them much easier for kids (and adults) to plug in.
The Raspberry Pi 4 has similar design and dimensions to its predecessors, but it’s an all-new platform, powered by a new processor, the Broadcom BCM2711B0. Since the first Pi in 2012, all Pis have used 40nm SoCs, but this new chip is based on a 28nm process and, instead of the older Cortex-A53 microarchitecture, it uses Cortex-A72. The BCM2711B0 in the Raspberry Pi 4 has four CPU cores and has a clock speed of 1.5 GHz, which at first blush doesn’t seem much quicker than the quad-core, 1.4-GHz BCM2837B0 in the Raspberry Pi 3B+.
However, Cortex A72 has 15-instruction pipeline depth, compared to just 8 on the older model, and it also provides out-of-order execution so it’s not waiting for the output of one process to start on another. So, even at the same clock speed (and the BCM2711B0 is based on a smaller process node), Cortex-A72 processors will be significantly faster and use more power than their A53-powered ancestors.
The RAM is also quite a bit quicker, going from 1GB of DDR2 RAM operating on the Pi 3B+ to up to 8GB of DDR4 RAM on the Pi 4. In addition to the increased bandwidth, having more memory is a huge deal, particularly for web surfing.
The GPU got a nice boost too, moving from a Broadcom VideoCore IV that operated at a core clock speed of 400 MHz on the Pi 3 B to a VideoCore VI that’s set at 500 MHz. The new architecture allows it to output to a display at up to 4K resolution with a rate of 60 frames per second or to support dualmonitors at up to 4K 30 Hz.
There are three current Raspberry Pi 4 models that are identical, except for the amount of RAM. For $35, the entry-level model sports 2GB of RAM, which is enough for most projects, from robots to retro arcade machines, but if you’re using the Raspberry Pi 4 like a desktop PC, you should get the 4GB model, which goes for $55.
The Raspberry Pi’s official Raspberry Pi OS (formerly known as Raspbian) is so memory efficient that we found it difficult to exceed 4GB, even with a ton of browser tabs open, videos playing and several different apps running. However, as more apps come out that take advantage of it, the $75 Raspberry Pi 4 (8GB) model will have more utility. If you can afford the extra $20 over the 4GB model, it’s a good idea to future-proof.
At 3.5 x 2.3 x 0.76 inches (88 x 58 x 19.5mm) and 0.1 pounds (46g), the Pi 4 is thin enough to fit in your pocket and light enough to carry anywhere. The board is durable enough to probably survive rolling around in your bag, but if you’re moving it around much, we recommend sticking it in a case, mostly to protect the pins. However, I often use the board bare on my desk and I’ve even shoved it into a pocket in my backpack without incident.
If you want a case, make sure you choose one that’s designed for the Raspberry Pi 4 (cases for earlier models won’t fit). We recommend buying a case that leaves the GPIO pins accessible.
The Raspberry Pi 4 covers more than just the basics when it comes to ports. The right side has four USB Type-A connections, two of which are USB 3.0. There’s also a full-size, Gigabit Ethernet port for wired connections there. The bottom edge has a 3.5mm audio jack, two micro HDMI ports and the USB Type-C charging port. On the left side, you’ll find the microSD card reader.
And on the top surface of the board, you’ll see ribbon connectors for the Camera Serial Interface (CSI) and Display Serial Interface (DSI), which provide dedicated connections to Raspberry Pi’s own camera and screen (or compatible accessories).
There’s a lot you can do with the CSI port, including use a Raspberry Pi Camera as a PC webcam or turning it into a motion-alert security camera. Of course, you can connect a camera to a USB port as well, and there are a couple of more common ways, including the micro HDMI ports, to output to a screen.
Perhaps the most important interface on any Raspberry Pi is its set of GPIO pins. Using these, you can connect to lights, motors, sensors and a huge ecosystem of HATs, which are expansion boards that attach to the top of the Pi. See the GPIO section below for more details.
To provide your Raspberry Pi 4 with juice, you"ll need a power source that can deliver at least 3 amps and 5 volts over a USB Type-C wire. The official Raspberry Pi 4 power supply, which costs around $10 - 12(opens in new tab), does the trick, but so will any phone or laptop charger that meets these minimum standards and outputs to USB-C. You can also power the Pi 4 off of a USB PD power bank that you would use to charge a phone.
Depending on how much juice your PC can output, it"s possible that you could power a Raspberry Pi 4 off of its USB-C port, though it"s possible that you"d see a lightning bolt icon appear in the top right corner of the screen, which means that the board is operating at reduced power.
Like every Raspberry Pi model ever made, the Raspberry Pi 4 has no power switch. The default way to turn on a Raspberry Pi is to just plug it in. When you"re ready to turn it off, you shut down the OS and then unplug the cable. You can also buy power switches that will turn the power on and off, but don"t forget to shut down the OS before cutting the electricity.
Note that all prior versions of Raspberry Pi used micro USB connectors for power and could work off of a 5-volt, 2.5-amp power supply (or often lower). So, if you have a power adapter from a Raspberry Pi 3, it won’t work with your Raspberry Pi 4.
In theory, any USB Type-C to Type-C cable should work, but models of the Raspberry Pi 4 that were produced before early 2020 had a small bug that prevented them from charging over "e-marked" USB cables. E-marked USB cables are usually those which offer high-speed data transfer over USB 3 at 10 Gbps. On the other hand, any cable that is USB 2.0 will definitely work with Pi 4, as will a lot of USB 3.1 cables at 5 Gbps.
We tested a number of USB-C cables on a Raspberry Pi 4 and found that the vast majority worked, with the major exceptions being an Apple MacBook charging cable and two 10 Gbps cables. Considering that you"re using this wire for charging only (the USB-C port only accepts power), there"s no reason to get one that supports high-speed data transfer. Raspberry Pi 4s that were manufactured in early 2020 and later have this problem fixed.
As with any Raspberry Pi, you’ll need a minimum of two things (aside from the board itself) to operate the Pi 4:A power adapter that outputs at least 5 volts and 3 amps over USB Type-C
A microSD card of at least 4GB (32GB is preferable) for the OS. After a firmware update, you can ditch the microSD card and boot off a USB drive if you want (see below).
If all you have is storage and power, then you"ll need to do a headless install of Raspberry Pi, where you control the computer remotely via VNC or SSH. Otherwise, you"ll also need:A micro HDMI to HDMI cable (or two) to connect to a TV or monitor. You can connect to two screens simultaneously.
You don"t absolutely need but might want the following accessories:A case to protect the Raspberry Pi 4. We recommend getting one that leaves you access to the GPIO pins.
Setting up a Raspberry Pi 4 is the same as older models. Our article on how to set up a Raspberry Pi for the first time shows you all the steps in detail. In short, you’ll put a blank microSD card into your PC or Mac and use Raspberry Pi Imager to ‘burn’ a disk image of Raspberry Pi OS onto it. Then, you can put the microSD card into the Raspberry Pi, turn it on and follow the setup process in Raspberry Pi OS.
No matter how fast your processor, RAM and GPU are, if your storage is slow, everyday tasks, like opening apps and files, will be laggy. Like all Raspberry Pis, the 4 B’s primary storage device is its microSD card reader, which is convenient but a bit constrained. According to the Pi Foundation, the 4 B has a top transfer rate of 50 MBps, which is double the speed of the reader on the 3 B+. There’s no known limit on capacity.
Our benchmarks, which we conducted with a Samsung EVO Plus microSD XC Class 10 card, show less impressive rates than the theoretical maximums. The Pi 4 B returned sequential read / write rates of 45.7 and 27.7 MBps, respectively, while the 3 B+ trailed at 22.8 and 17.5 MBps, respectively. Keep in mind that the card is rated for 100 MBps reads and 60 MBps writes.
If you have a speedy USB Flash drive or an external SSD, you can get far better storage performance out of the Pi 4 B. The Pi 4 B is the first Pi with USB 3 ports, which have a maximum theoretical bandwidth of 625 MBps. To find out how this works in real-life, we attached an external SSD to a Raspberry Pi 4 B. You"ll find full results in the article, and what we found was impressive.
With a recent firmware update, you can now boot your Raspberry Pi 4 from a USB SSD or Flash Drive. So, after you’ve installed the firmware and correct files to your external drive, you can take out the microSD card altogether.
In testing, the PI 4 B’s Ethernet port achieved 943 Mbps, which blows away the other Raspberry Pis. In fact, in a throughput test, the Pi 4 B got 943 Mbps (close to the 1,000 Mbps maximum). That’s nearly five times as many as the Pi 3B+, which only got 237 Mbps.
With a more power-hungry processor and the need for at least a 5-volt, 3-amp power adapter, the Pi 4 should be expected to consume more power than its predecessors.At idle, the Pi 4 B draws 3.4 watts, which is just 17% more than the 3 B+. Under load, that number jumps to 7.6 watts, but that’s still only 19% more juice than its direct predecessor. If you want the lowest-power Pi, performance be damned, then go for the Pi Zero W, which consumes a mere 0.8 watts at idle and 1.6 watts under load.
When the Raspberry Pi 4 first came out, it ran much hotter than it does today. Thanks to some firmware updates, the burning hot USB controller isn’t quite as toasty as it was at launch. Still, if you’re doing any kind of serious task on the Pi 4, we recommend a fan or at least a heatsink so you can avoid throttling. Our favorite fan solution is the Pimoroni Fan Shim, which attaches to the GPIO pins.
The real star of the show on any Raspberry Pi is its set of 40 GPIO (General Input / Output) pins. The pin count and layout remains unchanged from prior models, going back to the Raspberry Pi 2, so any HATs (hardware attached on top), sensors or LED screens that were made to attach to a Pi 2 or Pi 3 will be compatible with the Pi 4.
However, the Raspberry Pi 4 has added a few new capabilities to some of the pins. For hardcore makers who are wiring up a variety of peripherals, the GPIO pins now support four additional I2C, SPI and UART connections. So, if your sensors or peripherals require any of these interfaces, you now have a lot more of them.
One of the goals of the Raspberry Pi 4 is to be a capable PC that anyone can use for surfing the web, doing light productivity work or even playing very basic games. In order to test this use case, I spent several hours doing my everyday work on the device and I even wrote portions of this review using it.
And while I wouldn’t want to use it every day, the free GIMP software provides a decent way to edit still images. If I wanted to crunch spreadsheets or compose documents outside of Google Docs, LibreOffice more than fits the bill.
Opening apps and tabs off of a microSD card made the system seem sluggish when compared to a modern, SSD-powered PC. However, you can attach an external SSD to the Raspberry Pi 4 to solve that problem.
The Raspberry Pi 4 has dual micro HDMI ports that can each connect to a separate monitor or TV and can operate at up to 4K (3840 x 2160) resolution. If you have multiple 4K displays (for recommendations, see our Best 4K Gaming Monitors page), you have a choice: you can either run each screen at a somewhat-sluggish 30 Hz refresh rate or you can enable 4K mode in the settings menu, which jacks up the voltage a little so you can run one monitor at 4K and 60 Hz and another at up to 1080p 60 Hz.
During extensive hands-on testing, I found that while 4K at 30 Hz is tolerable, little things, like the movement of the mouse pointer, are a bit sluggish. If you have a 4K screen, you’re definitely better off going for the 60 Hz mode, but note that the added voltage may also cause your CPU to get hot and throttle more easily, so use that fan.
While surfing the web, looking at still images and just enjoying all the extra screen real estate of 4K is great, high-res video streaming is the Raspberry Pi 4’s Achilles heel. Because YouTube uses VP9 compression, which Raspberry Pi isn"t optimized for, videos can appear jerky if you view them at full screen (they play fine in a window). And because of DRM protections, Netflix and other paid streaming services just won’t run in Chromium.
Adding more video memory can also help with playback. To adjust the amount of video memory, launch the Raspberry Pi Configuration tool from the Preferences section of the start menu. Then, change the GPU memory to 128 or 256 on the Performance tab.
Playing offline 1080p videos works well, provided your screen is at 1920 x 1080 or lower resolution. A downloaded trailer of Avengers: Endgamewas perfectly smooth when I watched it using the VLC player.
Game emulation is one of the most popular use cases of any Raspberry Pi, and the Pi 4 follows suit. For nearly a year after launch, the most popular emulation platform, RetroPie, didn’t officially support the Raspberry Pi 4. However, now Pi 4 owners have your choice of either RetroPie or Lakka. We prefer the interface and broad support of RetroPie.
With an emulator, you can play games from a wide variety of classic systems, from original arcade games to the Sega Genesis and Nintendo 64 (N64). With its faster processor, the Raspberry Pi 4 should work better for emulating more demanding games, such as the N64 title GoldenEye 007.
To install Retropie, just download the Raspberry Pi 4 disk image and use Etcherto burn it to a microSD card.Then, boot up and follow the instructions.
It"s very easy to set up a Raspberry Pi web server, and this is one of the most popular use cases for the computer. In fact, at Tom’s Hardware, we use a Raspberry Pi 3 B as a server on our local network that we use to host our battery test for our laptop reviews.
We’ve explained how to overclock the Raspberry Pi 4 and what kind of results you get in a separate article. However, the top line is that you can easily overclock the 1.5 GHz CPU over 2 GHz (in our case, up to 2,147 MHz) and increase the frequency of the GPU from 500 to 600 MHz without missing a beat. Just make sure that you have a fan, such as the Pimoroni Fan Shim.
The Raspberry Pi 4 is the best Raspberry Pi, the best single-board computer and one of the best values you can get in tech. While most adult users would not want to replace their PCs with one, the Raspberry Pi 4 is powerful enough to use a desktop computer in a pinch.
However, the biggest benefit of the Raspberry Pi’s performance and generous helping of RAM comes not from folks who use Raspberry Pi 4s in lieu of x86 PCs, but from all the innovators who harness that power to create new IoT devices, servers and robots.
Editor’s Note: A few of the benchmark results in this article were licensed from contributor Gareth Halfacree, who has posted his own,detailed analysisof Raspberry Pi 4 performance on Medium.
The 7" Touchscreen Monitor for Raspberry Pi gives users the ability to create all-in-one, integrated projects such as tablets, infotainment systems and embedded projects. The 800 x 480 display connects via an adapter board which handles power and signal conversion. Only two connections to the Pi are required; power from the Pi’s GPIO port and a ribbon cable that connects to the DSI port present on all Raspberry Pi’s. Touchscreen drivers with support for 10-finger touch and an on-screen keyboard will be integrated into the latest Raspbian OS for full functionality without a physical keyboard or mouse.
Make your own ‘Internet of Things’ (IoT) devices including a visual display. Simply connect your Raspberry Pi, develop a Python script to interact with the display, and you’re ready to create your own home automation devices with touch screen capability.
A range of educational software and programs available on the Raspberry Pi will be touch enabled, making learning and programming easier on the Raspberry Pi.
Until recently the Raspberry Pi was not powerful enough to show Bizplay content properly. With the 4th generation of this device becoming available in 2020 this was the first time this hardware became usable as a player for Bizplay. We advise you to use the Raspberry Pi 4 model B with 4GB or 8GB of memory (the 8GB memory is only useful if you use a 64 bit version of the operating system). Any other model should be avoided or used for static content only. We further advise to connect the Raspberry Pi to only one monitor/TV with a 1080p resolution even though it is advertised to be able to connected to two 4K monitors.
This article assumes you are able to assemble a Raspberry Pi into one of the available cases and create a SD card to be used in the Raspberry Pi. Knowledge of Linux will probably make it easier to follow the description below but is not necessary. If you feel these concepts are "not for you" you should probably have a look at using a Chromebox or one of the other player options that can be used with Bizplay.
To use a Raspberry Pi as a player for Bizplay you need; a Raspberry Pi 4 (model B with 4GB or 8GB of memory), a power supply that is as powerful as this model of the Raspberry Pi foundation (if the power supply cannot deliver the power that de Pi needs the Pi will shutdown unexpectedly), a case that preferably cools the CPU passively and a micro SD card of at least 16GB. It is important that the CPU/GPU is cooled to get the best performance out of the device. However fans should be avoided since they are very small and can easily get clogged up with dust when the device is mounted behind a TV.
There are two options install the Raspberry Pi as a player. We advise to use the first method using our ready-made SD-image that is based on Raspberry Pi OS (also called raspios and that was previously known as Raspbian). The second - DIY method - takes longer, requires more knowledge of Linux and will likely not result in a better performing device.
To perform all steps on this page you will need, apart from the Raspberry Pi: a keyboard, a mouse, a PC or laptop that has an SD card reader or a separate USB SD card reader that you connect to your pc or laptop.
For both options it is necessary that you assemble the Pi into the case and connect the power supply, keyboard and mouse to the Pi. Leave the device off (by not connecting the power supply to the mains) until the instructions tell you to turn it on. Since there is no power button on the Pi you turn it on and off by connecting and disconnecting the power supply.
For both options it is necessary to have software on your PC/laptop that can write an image file to an SD card. If you do not already have software that can do this please install the application that the Raspberry Foundation offers on their site for this purpose. You can download versions for Windows, MacOS and Debian or Ubuntu Linux.
The screen should show a black page showing a registration code. We are not yet going to use the code for registration of the player. We close the playback by typing Ctrl-W
Choose the correct country, timezone and other settings and continue through the wizard by clicking next. When asked for a new password for the pi user leave the fields empty. At the end of the wizard it will check for software updates. It might take some time for these to be downloaded and installed. By running through the wizard you have set up the Pi for the appropriate time zone and you have updated the software to the latest version.
Add the following new line to the end of the file:30 19 * * * sudo shutdown -P now and save the file. This this will shutdown the Pi at 19:30 (7:30 PM).
The Raspberry Pi can be automatically shutdown using a cron job, see the description above. The most basic way to turn the Pi on is to use a timer switch.
Please Note: when using a timer switch you should make the switch power off the Pi after the cron job has done the shut down of the Pi, to prevent corruption of the data on the SD card that can occur when removing power from a running system.
An alternative for the cron job and timer switch is using additional hardware such as the Witty Pi by UUGear. Please follow the instructions of the manufacturer of the hardware solution to achieve the required results.
To ensure the best security and performance for your Raspberry Pi we advice you to regularly check for and install updates to the Raspberry Pi OS and the installed software. To do that you:
Run through the wizard, everything should be already set correctly, don"t set a password for the pi user, at the end of the wizard it will check for updates and install them.
We advise to use Raspberry Pi OS (raspios) as the preferred Linux distro for the Pi since that has the best CPU/GPU drivers and uses specific optimalisation on Chromium. Ubuntu Mate is also a performant alternative. If you want to use a different distro:
I"m working on some new projects involving getting stock price data from the web, which will be tracked and displayed via my Raspberry Pi. I wanted to share the setup on how to do this using Python.
This short Instructable will show you how install a stock querying library to get (mostly) realtime stock prices using Yahoo Finance API. There"s no GitHub involved!
If you haven"t done so already, you"ll want to do a basic configuration of your Raspberry Pi. You"ll need internet access for this software installation.
pip is a package manager and installer for Python. We want to have this installed to get the appropriate Yahoo python stock libraries loaded onto the Pi.
A number of people have used a Motorola Atrix Lapdock to add a screen and keyboard with trackpad to RasPi, in essence building a RasPi-based laptop computer. Lapdock is a very clever idea: you plug your Atrix smart phone into Lapdock and it gives you an 11.6" 1366 x 768 HDMI monitor with speakers, a keyboard with trackpad, two USB ports, and a large enough battery for roughly 5 hours of use. The smart phone acts as a motherboard with "good enough" performance. The advantage over a separate laptop or desktop computer is that you have one computing device so you don"t need to transfer files between your phone and your desk/laptop.
Unfortunately for Motorola, Lapdock was not successful (probably because of its US$500 list price) and Motorola discontinued it and sold remaining stock at deep discounts, with many units selling for US$50-100. This makes it a very attractive way to add a modest size HDMI screen to RasPi, with a keyboard/trackpad and rechargeable battery power thrown in for free.
Lapdock has two connectors that plug into an Atrix phone: a Micro HDMI D plug for carrying video and sound, and a Micro USB plug for charging the phone and connecting to the Lapdock"s internal USB hub, which talks to the Lapdock keyboard, trackpad, and two USB ports. With suitable cables and adapters, these two plugs can be connected to RasPi"s full-size HDMI connector and one of RasPi"s full-size USB A ports.
The RasPi forum has a long thread on Lapdock with many useful suggestions, photos, and links: I made a Raspberry PI Laptop. There"s also a good "blog entry at element14 with photos and suggestions of where to get cables and adapters: Raspberry Pi Laptop. TechRepublic has a tear-down article with photos of Lapdock internal components here: Cracking Open the Motorola Droid Bionic Lapdock. Paul Mano has a wealth of photos of Lapdock innards at Motorola Atrix Lapdock mod projects.
Lapdock uses the HDMI plug to tell if a phone is plugged in by seeing if the HDMI DDC/CEC ground pin is pulled low. If it"s not, Lapdock is powered off. As soon as you plug in a phone or RasPi, all the grounds short together and Lapdock powers itself on. However, it only does this if the HDMI cable actually connects the DDC/CEC ground line. Many cheap HDMI cables do not include the individual ground lines, and rely on a foil shield connected to the outer shells on both ends. Such a cable will not work with an unmodified Lapdock. There is a detailed "blog entry on the subject at element14: Raspberry Pi Lapdock HDMI cable work-around. The "blog describes a side-benefit of this feature: you can add a small power switch to Lapdock so you can leave RasPi attached all the time without draining the battery.
The Lapdock Micro USB plug is the upstream port of Lapdock"s internal USB hub, and connects to one of RasPi"s full-size USB ports. Lapdock is not USB compliant since it provides upstream power on its Vbus pin. Lapdock uses this to charge the Atrix phone. You can use this feature to power RasPi if you have a newer RasPi. The original RasPi rev 1 has 140 mA polyfuses F1 and F2 to protect the USB ports, which are too small for powering RasPi using upstream power. Newer RasPis replace F1 and F2 with zero Ohm jumpers or eliminate them entirely, which allows Lapdock to provide power. If you don"t mind modifying your original RasPi, you can add shorting jumpers over F1 and F2 or replace them with higher-current fuses.
What gets powered on depends on whether Lapdock is open or closed. If it"s open, the screen and all Lapdock USB ports are powered. If you close Lapdock, the screen and full-size USB ports are powered down, but the Micro USB still provides upstream power. This is for charging an Atrix phone. When you open or close Lapdock, the Micro USB power switches off for about a second so if your RasPi is connected it will reboot and you may have a corrupted file system. There"s discussion about this at the RasPi forum link, and someone has used a supercapacitor to work around the problem: Raspberry Pi lapdock tricks.
When you do not connect a HDMI monitor, the GPU in the PI will simply rescale (http://en.wikipedia.org/wiki/Image_scaling) anything that would have appeared on the HDMI screen to a resolution suitable for the TV standard chosen, (PAL or NTSC) and outputs it as a composite video signal.
The Broadcom BCM2835 only provides HDMI output and composite output. RGB and other signals needed by RGB, S-VIDEO or VGA connectors are however not provided, and the R-PI also isn"t designed to power an unpowered converter box.
Note that any conversion hardware that converts HDMI/DVI-D signals to VGA (or DVI-A) signals may come with either an external PSU, or expects power can be drawn from the HDMI port. In the latter case the device may initially appear to work, but there will be a problem, as the HDMI specs only provide in a maximum of 50mA (@ 5 Volt) from the HDMI port, but all of these adapters try to draw much more, up-to 500mA, in case of the R-PI there is a limit of 200mA that can be drawn safely, as 200mA is the limit for the BAT54 diode (D1) on the board. Any HDMI to VGA adapter without external PSU might work for a time, but then burn out D1, therefore Do not use HDMI converters powered by the HDMI port!
The solution is to either only use externally powered converters, or to replace D1 with a sturdier version, such as the PMEG2010AET, and to replace the power input fuse F3 with a higher rated one, as the current one is only 700mA, and the adapter may use 400mA itself. Also notice that the R-PI"s power supply also must be able to deliver the extra current.
Alternatively, it may be possible to design an expansion board that plugs into the LCD headers on the R.Pi. Here is something similar for Beagleboard:
The schematics for apples iPhone 3gs and 4g suggest they speak DSI, thus they can probably be connected directly. The older iPhones use a "Mobile Pixel Link" connection from National Semiconductor. The 3GS panel (480×320) goes as low as US $14.88, while the 4G one (960×640, possibly the LG LH350WS1-SD01, with specifications) can be had for US $17.99 or as low as US $14.28. The connectors used might be an issue, but this connector might fit. Additional circuitry might be necessary to provide the display with required 1.8V and 5.7V for operation, and an even higher voltage for the backlight.
The Raspberry Pi provides one clock lane and two data lanes on the S2 connector, as can be read from the schematics. It is currently unknown whether this is enough to drive the iPhone 4G screen, as that screen seems be driven with three data lanes in its original application.
I2C/SPI ADC can be used to interface 4 pin resistive Touch Screens, For example STMPE812A. Texas Instruments has a solution for 4 or 8 wire touchscreens using their rather cheap MSP4309.
Parallel interface displays can be found in many sizes, usually up to 7" and more. Parallel interfaces are usually 8 or 16-bits wide (sometimes 18 or 24-bit wide), plus some control-lines. The Raspberry Pi P1-connector does not contain enough GPIOs for 16-bit wide parallel displays, but this could be solved by borrowing some GPIOs from the CSI-connector or from P5 (on newer Raspberry Pis). Alternatively, some additional electronics (e.g. shift-registers or a CPLD) can be used, which could also improve the framerate or lower the CPU-load.
AdvaBoard RPi1: Raspberry Pi multifunction extension board, incl. an interface and software for 3.2"/5"/7" 16-bit parallel TFT-displays incl. touchscreen with up to 50 frames/s (3.2", 320x240)
Texy"s 2.8" TFT + Touch Shield Board: HY28A-LCDB display with 320 x 240 resolution @ 10 ~ 20fps, 65536 colors, assembled and tested £24 plus postage, mounts on GPIO pins nicely matching Pi board size, or via ribbon cable
Raspberry Pi is a tiny, cost-effective computer that comes in many shapes and sizes and facilitates a whole host of applications, ranging from something as simple as learning how to code to complex home automation projects; the scope of use is limitless.
One of the many features that make the Raspberry Pi so versatile is its ability to run all kinds of programs, just like a regular computer. In fact, not just that, you can even write your own scripts — for whatever objective you have in mind — and run them on the Pi.
Although the Raspberry Pi is capable of running all sorts of programs, you still need to manually execute these programs every time you want to run them. Clearly, this approach involves an extra step. And even though it doesn"t pose much inconvenience, there are instances when you"d need a program to run right after the Raspberry Pi boots up.
For example, imagine using your Raspberry Pi to monitor stock prices: wherein you run a script every day when your Pi boots up, and it pulls information from pre-defined resources and presents it to a display.
Here, despite streamlining the process of tracking stock prices, you still have to execute the script each day. However, thanks to automation, it"s possible to eliminate the manual input from the equation by having your Pi run the script automatically on startup.
There are several ways to run a program at startup on Raspberry Pi. For this guide, though, you"ll learn how to use three of these effective and easy to follow methods.
Note: We"ve used these methods to execute our Python script, and you can do it with any of your scripts or even the onboard programs on Raspberry Pi. Just make sure you"re using the right method to execute your program.
rc.local is a system-administered file that executes after all the system services start, i.e., after switching to a multi-user run level. It is the easiest method to make programs run at boot on Linux systems. But there"s a caveat: you can only use this method for programs with no GUI (graphical user interface) elements since rc.local executes before Raspberry Pi"s windowing system starts.
Here, replace PiCounter/display.py with your program/script name. Also, make sure that you use the absolute path to your program and not its relative path.
(Notice that the command ends with the ampersand (&) symbol. This to inform the system that the program we"re scheduling runs continuously, so it shouldn"t wait for your script to finish before starting the boot sequence. Do note that failing to add ampersand in the command will cause the script to run forever, and your Pi will never boot up.)
Once your Pi boots up, it should run your program automatically. If, for some reason, you want to stop the program from running on boot, edit the rc.local file again to remove the line you just added.
Open the CLI on your Raspberry Pi and enter crontab -e to edit the cron job table (crontab). If you"re opening crontab for the first time, you"ll need to select an editor. You can choose your preferred editor or continue with Nano. In either case, enter the name of the editor and hit Enter.
To make an entry into the cron table, enter the command: @reboot python3 /home/pi/PiCounter/display.py &. In your command, make sure you replace the program name and its path.
Autostart is the best way to run GUI-based Raspberry Pi programs on startup. It works by ensuring that both the X Window system and the LXDE desktop environment are available before the system runs any of the scheduled programs.
If you have a script that runs in the windowed mode, or you want to run any of the GUI-based programs/applications at startup on your Raspberry Pi, you should schedule them to run using autostart. Here are the steps to do this.
First, open the terminal and enter the following command to create a .desktop file in the autostart directory: sudo nano /etc/xdg/autostart/display.desktop. We"ve used display.desktop as file name, but you can name your desktop file anything you want.
In this file, replace the value for the Name field with your project/script name. Similarly, we"ve added our display.py program to run every time the Raspberry Pi boots up.
As soon as your Pi boots up, your GUI program should automatically start as well. In case you"d like to stop your program from running at startup anymore, simply go to the autostart folder and remove the .desktop file you just created.
While there are many ways to run a program at startup on Linux-based systems, the methods we"ve mentioned in this guide should help you with scheduling programs on the Raspberry Pi.
If you have been using a Raspberry Pi, you might have encountered that the screen sleeps or turns off after some time when you do not use the mouse or keyboard.