Tag Archives: Raspberry Pi Projects

BrickPi to Turn Your Raspberry Pi Into a Robot

It is easy to turn your tiny Single Board Computer, the Raspberry Pi (RBPi), into a robot. All that you need is a BrickPi board and a case that will fit onto your credit card size computer and make it capable of accepting inputs from sensors, to running motors and other parts. With the BrickPi, you can drive up to four EV3 or NXT motors and five sensors. A 9V battery powers the board and drives the motors and sensors, including the RBPi. While the sturdy case that holds the RBPi, has holes that can snap in LEGO parts, the LEGO Mindstorms’ BrickPi board untethers your RBPi from the wall outlet.

For programming the BrickPi, you have a choice from among three languages – Python, C and Scratch. If you need information on using these languages, visit the github site. It includes examples and drivers as well, including several projects that setup the BrickPi and demonstrate its use. The projects involve demonstrations of controlling the robot with web services such as Twitter, SSH and other web pages. Apart from the program listing for running these projects, the site includes Bill of Materials for the LEGO parts that the robots will need to use.

While the BrickPi controls the sensors, the LEGO motors and the new EV3 motors, the RBPi, in turn, controls the BrickPi. You can power the BrickPi with an on-board 9-12V battery pack, which will also supply the RBPi, the sensors and the motors. The design of the BrickPi is entirely open-source, so anyone can see the design and other details of the firmware design.

Creating a robot with the RBPi and BrickPi is indeed challenging, but not too difficult, since there are plenty of examples and drivers available. Once you have mastered the basics, you can progress to the more advanced creations. Using the LEGO elements makes the job even simpler and you can simply watch your computer come alive.

The BrickPi, controlling the four servomotors, offers precise control over the robot, ensuring that the robot moves with precision. The built-in rotation sensors can measure steps with on-degree accuracy. Among the other sensors is an ultrasonic sensor, to allow the robot measure distances and avoid obstacles. Two additional vision sensors allow the robot to sense and detect movement.

The BrickPi even has two touch sensors, with which your robot can pick things up on command, since they can detect when they are releasing or pressing something. For example, the touch sensor, when pressed, can allow your robot to talk, walk, turn off your TV or close a door. In addition, the included color sensor can be used either as a color lamp, distinguish light settings, detect black and white or distinguish a range of bright and paste colors.

Overall, the clever design elements in the BrickPi score an excellent rating. Users will enjoy the way it brings a new level of interaction to their experience of using LEGO parts and will appreciate the easy way of creating their first robot. The simplicity of building any robot from the cool hardware encourages inventive play.

A water cooler for the Raspberry Pi

Although the tiny Single Board Computer called the Raspberry Pi (RBPi) is mainly to teach the young kids how to code, several people are now hooked onto it and are executing extraordinary projects with it. Like other CPUs in regular computers, the RBPi can as well be overclocked and run in a turbo mode. Last year, the Pi Foundation, originators of the SBC, added the turbo mode and clarified that this will not void the warranty. Therefore, you can safely apply turbo mode when the RBPi is busy, limit turbo when the core of the RBPi (the BCM2835) reaches 85°C. By doing so, you will not be reducing the lifetime of your SBC.

Phame, from London, wanted to use more of the turbo mode without limiting the RBPi in any way. His immediate concern was to keep the BCM2835 cool. His motivation came in the form of a competition for building a new case for RBPi. That set him on the path of water-cooling the RBPi using a carefully designed case suitable for the purpose.

Phame went on to make a water block that sits on top of the RBPi’s CPU, LAN controller and some of the other components. Two pipes lead from the water block to a radiator filled with a coolant, circulated with a tiny British micropump. The radiator is a large aluminum tank, roughly 98x70x17 mm, containing more of the coolant. The entire rig sits in a frame and the pump draws its power from the RBPi. Phame custom made the frame, water block and the radiator, including the custom etching of the Pi logo on its interior.

The contraption works via convection, the process by which hot liquid rises to the top, to be replaced by colder parts of the liquid. As the CPU and other parts of the RBPi start to get hotter when run in turbo mode, the temperature of the coolant inside the water block that is in contact with the chips also rises. The hot liquid moves towards the upper part of the water block, and colder liquid flows in from the radiator below. By itself, this process would have sufficed to keep the temperature of the hot parts in check, but Phame added a pump to accelerate the coolant flow.

The micropump circulates the coolant between the radiator and the water block. Therefore, hot coolant from the water block moves on and colder liquid replaces it, thereby effectively removing the heat from the CPU and other parts. The hot liquid passes into the radiator, where it transfers the heat it is carrying into the aluminum. As a large surface of the aluminum radiator is in contact with the air outside, the heat is radiated into the ambient. Phame has gold-plated the internal surface of the aluminum radiator, so that the coolant in contact cannot corrode the surface.

You can see the rig in operation in this video. The only thing that Phame has not declared is whether he has operated the RBPi with the water cooler in place. It would be nice to have some temperature readings.

Add a Real Time Clock to Your Raspberry Pi

The Linux-based credit card sized single board computer, the Raspberry Pi or the RBPi is designed to be low-cost and of small form factor. As such, many features that are available on normal computers, but considered superfluous here, have been left out. The real time clock is one among them. That makes the RBPi unable to keep time when its power supply has been removed.

Typically, the RBPi is expected to be connected to the Internet via the Wi-Fi or the Ethernet and to update its time automatically from the Network Time Protocol servers available globally. In the absence of an on-board RTC, when there is no Internet connection or when the power to the board is removed, the RBPi is unable to keep time. However, that can be easily rectified by adding a small RTC module running on DS1307 and a tiny coin battery. This allows the RTC to continue to keep time even when the RBPi does not have power supplied to it.

To make things easy, use Adafruit’s Breakout Board kit for the DS1307 RTC. This kit already has all the parts required, including the coin battery. Although the components can be purchased separately and assembled on a breadboard, the coin battery holder can pose a problem, as it is not breadboard-friendly. The kit on the other hand, has a dedicated place for the battery holder, making it more convenient to use.

To allow the RTC chip to communicate effectively with the RBPi, the two 2.2KΩ resistors on the kit must be left out. There is no need for these resistors since the RBPI already has two 1.8KΩ resistors on-board and they are connected to the 3.3V supply, as the RBPi needs them to be. Therefore, either do not solder the two resistors to the breakout board, or, if you have already soldered them in, remove or clip them out. The breakout board needs 5V, so connect the VCC on the board to the 5V pin of the RBPi.

Now, you will need to set up the I2C interface on the RBPi. For this, your RBPi must be running a kernel that includes the RTC and DS1307 modules. The latest version of the Raspbian OS already has the modules included, but older versions may not have them. Adafruit has a wonderful tutorial that will guide you for setting up and testing I2C on the RBPi, check it out here.

At the command line, you can run the command “sudo i2cdetect -y 0” to check your wiring. If you have a rev2 RBPi, enter the command “sudo i2cdetect -y 1”. Once you see ID #68 being displayed, you know that your wiring is correct, as this is the address of the DS1307. Once you get the kernel driver running, i2cdetect will show UU instead of 0x68, further confirming that everything is good.

The next step is to load up the RTC module and set it up as root. Follow the tutorial for doing that and you can check the time with the command line “sudo hwclock -r”. If you are using the module for the first time, the date will be Jan 1 2000 – set it to the current time, and you are done.

Building a UPS with Raspberry Pi and Supercapacitors

It is always a dilemma when integrating a Raspberry Pi (RBPi) Single Board Computer into a project that works on the mains voltage and the RBPi has to turn it on or off. The difficulty is in deciding whether to power the RBPi separately or maybe power it from a UPS.

Lutz Lisseck solved the problem in an ingenious way. He was looking for a way to shut down his RBPi gracefully, after it had turned off his ambient-lamp. Since the lamp operated directly from the mains and Lutz wanted to turn it on/off from the mains power switch, he would normally have two choices. He could either use a mains wall adapter to power his RBPi or use a battery pack as a traditional UPS. He decided he did not like either, and instead opted for a third alternative, building a UPS with supercapacitors.

Lutz used two 50F supercapacitors to make his UPS. When the lamp was on, the capacitors stored enough charge to outlast the RBPi. When the SBC cuts the power, a GPIO pin senses the loss and informs the RBPi to begin its shutdown sequence. The RBPi takes about 30 seconds to shut down, and the capacitors happily power it for the time. Supercapacitors are usually rated at 2.7V; therefore, Lutz had to put them in series for the RBPi to get 5V. An alternative would be to place the capacitors in parallel and use a step-up converter to jack up the voltage. An upside to this is the capacitors will supply the RBPi for a longer time.

Since the project was a very simple one, there are some shortcomings in using the RBPi this way. First, the capacity is just about enough to shut down the RBPi in 30 seconds. However, when switched on, the capacitors take time to charge and the RBPi has to wait for about 10 seconds, before it gets adequate voltage to boot. Another drawback is that although the RBPi has only 30 seconds to shutdown, the capacitors discharge very slowly, and the system has to remain unplugged for about 10 minutes after shutdown, before it will boot up again. For this ambient-lamp project, Lutz does not consider that as a handicap.

Using supercapacitors over batteries has some advantages as well. The capacitors have a lifetime that far surpasses that of batteries. For example, you could charge and discharge supercapacitors completely several 100,000 times. Moreover, supercapacitors can be charged and discharged at rates that are not possible with a battery. A completely discharged supercapacitor can be fully charged up in just 2 minutes.

Therefore, with the supercapacitors in place, you do not need to worry about improper shutdown when the mains supply collapses. A GPIO pin on the RBPi senses when the mains voltage has been removed and the RBPi immediately begins a shutdown sequence. Whether using the supercapacitors in series or in parallel, a low value resistor (0.5-2.0 Ohms) must be placed in series with the batteries to limit the inrush current at startup. As the resistor can get hot, preferably a high wattage type should be used.

Automation Controller Uses Raspberry Pi Compute Module

Remote control has a new face. Based on the tiny credit card sized single board computer Raspberry Pi or RBPi, Techbase has designed a Linux-based ModBerry automation computer. They back it up with an iMod cloud platform. ModBerry is all about remote control.

This version of RBPi was introduced lately and known as the Compute Module or Computer-on-Module. People in Poland have taken up the RBPi Compute Module wholeheartedly and turned it into ModBerry. Initially, the Polish startup Sher.ly started with Sherlybox, a private cloud storage device based on the RBPi COM (Compute Module). Now, Techbase, the industrial computer manufacturer from Gdansk, Poland, has based their automation computer ModBerry 500 on the RBPi COM.

The RBPi COM is a part of the development kit that Farnell Element 14 and RS Components have released recently. The kit also contains a separate baseboard. Later plans include selling the module independently.

Techbase is already in the market with numerous Linux-ready and Linux-based automation controllers and industrial computers. Techbase supports some of its computers with its cloud-based iMod, iModCloud and iModWizard, which also provide Software-as-a-service or SaaS applications. This includes its telemetry computer iMod-X1000.

In contrast, Sherlybox is a private crowd based on local storage. With the iMod ecosystem, users can store data and control several iMod compatible computers via a cloud platform. By combining ModBerry 500 and the software from iMod, users have access to applications in the general automation market and intelligent buildings. According to Techbase, they can also monitor and control wind farms, GSM base stations and power stations. Users can set up their devices as protocol converters, telemetry modules, data loggers, servers, MODBUS routers, PLC devices, SNMP agents and many more.

The iMod system is a versatile arrangement offering multi-level, user access cloud management via configuration files. According to Techbase, its iModWizard makes it unnecessary for the user to possess any programming knowledge. Users can freely create different user profiles such as end-user, administrator and system designer. Additionally, iModCloud helps users to update software and configure services.

With iModCloud, users have custom-based actions including notifications and management, which are extremely important for remote control. Users can see the location of GPS-enabled devices on maps provided as part of data visualization capabilities. Users can access their data on smartphones or tablets. Techbase assures security via SSL certificates and encrypted VPN communication.

The ModBerry 500 operates on a wide-ranging 9-24V AC/DC supply. It is available in commercial as well as in extended models, which can work between -25 and 80°C. The physical dimensions are 106x91x61 mm. The ModBerry 500 gets its computing power from the RBPi COM, which provides it with the 700MHz ARM11 Broadcom system-on-chip processor running Raspbian Linux. The module also shares its 512MB RAM and its 4GB NAND flash storage with the ModBerry.

The hardware features of the ModBerry include several real-world ports such as a USB 2 host port, a 10/100 Ethernet port, a slot for SIM card, audio out and a user programmable button. Other ports include an HDMI port and a reset button. There is also a pair of RS-232 and RS-485 ports, CAN ports and a 1-wire bus.

For more information on ModBerry 500, refer to this website.

DIY Google Glass with Raspberry Pi

If you thought Google Glass was something beyond your capabilities, well you can think again. Adafruit has a Do-It-Yourself design that can turn a pair of display glasses into the coveted Google glass type of form factor. Not only does it clip to the prescription glasses you are using, it can display any type of device that puts out Composite Video such as the Raspberry Pi or RBPi does.

With 3D printed parts you can download free, one pair of these wearable video glasses will cost you only $100. The display uses simple plug-n-play technology to connect to the RBPi. The project uses the NTSC/PAL Video Glasses (1:20) and uses only one-half. The glasses are full-color LCD micro-display presenting a virtual large screen of 52” at 2m distance. With a resolution of 320×240, and a color depth of 24 bits, it has an in-built LiPoly battery rated at 800mAH, which lasts for 4-5 hours. You will also need miniature wireless USB keyboard with touchpad and of course, an RBPi.

Other parts that you will need for this project are a 3D printer to print out the parts, flat pliers, 30AWG Wire Wrap, a pack of heat shrink tubing, a screwdriver set and a composite video cable.

You start with disassembling the Video Glasses. First, remove the nose guard piece. For this, you may have to remove tiny screws – use a small screwdriver. Then, carefully pop the shaded lenses off. There will be more tiny screws behind the lens, remove them and the frame should come off easily. Now, gently pry open the enclosure and use a flat-head screwdriver to separate the two halves. Remove the PCB from its enclosure – use a pair of flat pliers. Also, remove the two video display screens from the enclosure. Holding the eye covers to the magnifying lenses, unscrew the two eyepieces. Now carefully detach one of the displays from the PCB and store away as a backup unit.

You will now have one of the video display units along with the kopin video processing circuit. The power circuit with its USB port and the two audio input jacks should also be present. With disassembly over, it is time to begin the assembly of the project.

Begin by unsoldering the four connections from the power circuit, as you will need to increase the lengths of the wires. Use about 140 mm or 5.6 inches of 30AWG wire to extend the length of the wires. You may need to tin the ends of each wire before soldering them together. Use heat shrink tubing to secure the connections. Disconnect all components before you put them into the enclosure.

3D print the eight pieces design to make the snap-fit enclosure. This will house the components extracted from the Video Glasses. The plastic eyepiece with the magnifying glass goes on top of the eye part. You can reuse the same screws to secure the eyepiece into the eye part. Positioning the eyepiece into the cap part, thread the cable connections through the opening on the side. Similarly, thread the wires through the elbow part and snap it in place. Assemble the rest of the parts following the guide here.

Raspberry Pi Temperature Monitor and Alarm Project

Although five-day weeks are a boon to white- and blue-collar workers, some businesses need to be extra careful during the two days of the weekend. For example, commercial monitoring systems generally protect warehouses with large freezers and cooler rooms. However, between Friday evening and Monday morning when the food shelf remains closed, a unit may blow a fuse. Usually, this goes unmonitored with the result that food is found ruined by Monday. The inexpensive, tiny credit card sized single board computer, the Raspberry Pi or RBPi was found to be a suitable base for a temperature monitor and alarm for a walk-in display-case cooler and freezer.

The project objectives are very simple. A low cost temperature monitoring system is required that can send free text messages when the temperature within the freezer or fridge goes outside the acceptable range.

For this, the RBPi has to monitor the temperatures within the fridge unit and the freezer. For the fridge unit, the valid temperature given is 33F, while it is -10F for the freezer unit. However, since stocking personnel and customers open the doors frequently during the business hours, temperatures in the fridge rises to 60F. Therefore, a wider temperature range is to be allowed during business hours as compared with the temperature range during off hours.

To draw the attention of maintenance personnel, the RBPi has to provide an audible temperature range alarm, which makes a noise when the temperature goes beyond the range. Additionally, a switch button is necessary, as a snooze, to silence the noise when the problem is receiving attention. As personnel are expected to be away on weekends, the RBPi is required to send a text message to someone who would be able to either fix the problem or move the food to a safer location. To make the temperature visible to the staff, an LCD temperature display is used. The RBPi is required to project the current temperature on a wall mountable LCD mounted outside the fridge/freezer unit.

Parts needed for the project include the RBPi Model B, although Model A can also be used. However, since Model A has only one USB port, an additional USB hub will be necessary. For the operating system, you will need the 8GB SD card with the NOOBS installer image. The Adafruit RGB 16×2 LCD kit with Keypad is the most suitable, since it has five momentary push-button switches useful for navigation. For connecting to the internet, you may use the Wi-Pi Wireless Adapter. In case you are planning for an XBMC solution, you will also need an Ethernet cable, an HDMI cable and wireless keyboard/mousepad.

For the audible alarm, you will need 2×3.5mm stereo headphone plugs, a portable speaker and audio cable. To house the RBPi, a suitable case will also have to be used.

You can use 2x DS18B20 Digital temperature sensors for monitoring the two temperatures. Although the stand-alone IC components are just as good, prepackaged waterproof units are available; these will suit the project better. When you are ready with the parts, follow the instructions in this tutorial to set up the project and to calibrate it.

Teaching Raspberry Pi to teach itself

For most of us, learning is a part of life. Beginning at birth, we learn how to understand emotions, walk and talk as the primary steps in learning. For machines, although learning appears to be high-tech, it is not an isolated incident. We see incidents of machine learning around us almost every day without knowing. For example, machine-learning algorithms accomplish automatic tagging of Facebook photos and spam filtering of emails. Most of machine learning is a step in the direction of achieving artificial intelligence. Recently, a lot of interest has been generated by a new area of machine learning known as deep learning.

So far, only big data centers had confined this knowledge of deep learning, as deep learning technology depends largely on huge data sets. Only the big data-mining firms such as Microsoft, Facebook and Google had access to such large amounts of data. Now, a new startup Jetpac is planning to let everyone access this technology. Any person with a computing device can use their app to access deep learning technology, as the video on their website shows (https://www.jetpac.com/deepbelief). However, you may find that this technology is not so perfect. Just as the human brain, machines too suffer from optical illusions – confusing sidewalks with crossword puzzles, flutes with spiral bound notebooks and trash bags as black swans – see it below.

Pete Warden has done a great job of porting deep learning technology to the immensely popular, credit card sized, inexpensive single board computer, the Raspberry Pi or RBPi. The factor that has helped this process is that RBPi has a GPU with roughly 20GFLOPS of computing power, according to the documentation released recently by Broadcom, the manufacturers. That enabled Pete to port his SDK of Deep Belief Image Recognition to the RBPi.

If you would like your RBPi to be able to recognize things it sees around itself, follow the instructions here. However, for running the algorithm on the RBPi, you must allocate at least 128MB of RAM to the GPU and reboot the RBPi so that the GPU can claim the memory freed-up in the process. When you first run the program deepbelief on your RBPi, it will spew out a long list of different types of objects.

Thanks to the documentation about the RBPi GPU made public by Broadcom, Pete was able to write custom assembler programs for the 12 parallel ‘QPU’ processors that lurk within the embedded GPU. Additionally, the GPU makes heavy use of mathematics, which allows the algorithm process a frame in around three seconds. The technical specs of the graphics processor were released only a few months back, which has led to a surge of community effort to turn that into useable sets of examples and compilers.

Pete had to patch one of the existing assemblers heavily so that it could support more instructions. He had to create a set of helper macros so that programming the DMA controller was easier. Once these algorithms were tuned to the GPU’s internal method of working, Pete released them as open source.

High Fidelity Audio from the Raspberry Pi

Although the Raspberry Pi or RBPi has many exceptional qualities such as a small form factor, low price, low power consumption and credit card size, the single board computer is not endowed with a high fidelity onboard sound output. Therefore, to get high-fidelity sound, you must add a sound card to the RBPi. For all RBPi users who love music, HiFiBerry produces sound cards designed for optimal sound quality output.

HiFiBerry has two types of boards depending on whether you are looking for an analog or a digital board. If you have an analog amplifier, use the DAC board. However, if you connect to your amplifier via an optics link, use the Digi board. The standard RBPi kernel in the Raspbian distribution supports both the boards and they use Open Source software. HiFiBerry provides all drivers for both boards as open source. These boards utilize the P5 connector on the RBPi.

The HiFiBerry DAC is available as a Standard version with RCA connectors or as a 3.5mm phone jack version for headphones. Both are fully soldered boards; however, if you prefer to do some soldering, there is a DIY kit as well. For providing the best sound quality, these boards use a dedicated 192KHz/24-bit DAC from Burr-Brown. No cables are required, as the board connects directly to the RBPi, which also supplies it with power. Optimal audio performance is assured with on-board ultra-low-noise voltage regulators. Mechanical spacing between the audio board and the RBPi requires nylon spacers.

To connect the DAC board, you will need to solder an 8-pin header on to the RBPi, on its onboard sound connector P5. Now simply plug the DAC board in and start using it. The on-board ultra-low-noise voltage regulator will filter out all the noise from the RBPi power supply and you do not require any additional power supply or cable.

If your amplifier connects with an optical signal, use the HiFiBerry Digi board, which offers a high-quality S/PDIF output. The board connects to the P1 and P5 headers of the RBPi and supports up to 192KHz/24-bit resolution via optical (Toslink) and electrical outputs. The audio data streams produced are bit-perfect outputs, unmodified in any way.

The Digi board is also available in two versions, one with an isolation transformer and the other without. Although the hardware on the board is capable of DTS/Dolby Digital output, suitable software is required to make its full use. At present, HiFiBerry is not providing this software, but they will offer support to developers who want to implement this feature. The isolation transformer will provide complete galvanic isolation between the DAC on its output and the amplifier. However, most consumer-grade SPDIF connections do not require any output transformers.

For the future, HiFiBerry is planning a high-quality highly efficient stereo class D power amplifier to be connected directly on to the RBPi. Only external loudspeakers are necessary to get full 2x25W output power when driving 4-Ohm speakers with 44.1KHz and 48KHz sampling rates. This board will require an external power supply of 12-18V, but will power the RBPi as well, so ultimately only one power supply will suffice.

Raspberry Pi Lights up an RGB LED Matrix Panel

Colorful LED screens are a joy to watch. Bright LEDs making up a 16×32 display are not only easy-to-use, but also low cost – you may have seen such displays in the Times Square. Controlling such a display is simple if you use the low-cost, versatile, credit card sized single board computer, the Raspberry Pi or RBPi. Although the wiring is simple, the display is quite demanding of power when displaying.

The items you need for this project are a 16×32 RGB LED Matrix Panel, Female-to-Female jumper wires, Male-to-Male jumper wires, a 2.1mm to Screw Jack Adapter, an RBPi board and a 5V 2A power supply. Use the Female-to-Female jumper wires to connect the display to the GPIO connector pins of the RBPi. Although this connection is display specific, following a generic pattern is helpful:

GND on display to GND on the RBPi (blue or black)
OE on display to GPIO 2 on the RBPi (brown)
CLK on display to GPIO 3 on the RBPi (orange)
LAT on display to GPIO 4 on the RBPi (yellow)
A on display to GPIO 7 on the RBPi (yellow or white)
B on display to GPIO 8 on the RBPi (yellow or white)
C on display to GPIO 9 on the RBPi (yellow or white)
R1 on display to GPIO 17 on the RBPi (red)
G1 on display to GPIO 18 on the RBPi (green)
B1 on display to GPIO 22 on the RBPi (blue)
R2 on display to GPIO 23 on the RBPi (red)
G2 on display to GPIO 24 on the RBPi (green)
B2 on display to GPIO 25 on the RBPi (blue)

When connecting the wires, ensure that both the display and the RBPi are powered off, as the display is able to pull some power from the GPIO pins. Once all the data pins are connected as above, it is time for the power supply to be connected. The panel has a power supply header and a cable that has two red wires for the positive supply and two black wires for the negative. While connecting these wires to the screw jack adapter, make sure of maintaining proper polarity. Additionally, double check that the power supply you are using is rated for 5V, as any other higher voltage is likely to fry the display. The sequence for powering up must be the display first and the RBPi last.

To display an image or a message, you must convert it to a ppm or portable pixel format. Image editors can do this for you and you can very well use the free open source application GIMP. Once the image is in the required format and placed in the specific directory, the display program picks it up and it appears on the display. Shift registers on the back of the display module help with the shifting or scrolling of the image on the display. Of course, the RBPi has also to do a lot of work in bit-banging the pixels onto the screen.

You may use the code as it is in C, or you may prefer to use Python. Currently, the program displays only eight colors; for reference, see here.