![]() Once the OS is copied onto the SD card, it is time to boot up the Raspberry Pi. If you are unsure about this, you may want to use a GUI utility so you don’t overwrite your hard drive. You can toast your hard drive if you put the wrong device path in here. We will see this again in a bit with the I2C device. Everything, including devices, is a file in Linux, in case you are wondering why your SD drive is considered a file. Second, the of device (i.e., the out file or our SD drive in this case) needs to match the SD card. First, the if parameter, which is the name the in file (i.e., your ISO image) needs to match the file you downloaded. You will need to change two important things in this command for your system. Will properly copy the OS onto the SD card. On Linux or Mac OS X, the command:ĭd bs=4M if=~/linux_distro.img of=/dev/sdd Next, use your chosen method to copy the OS onto the card. The best format is FAT32, since it will get reformatted by the copy command anyway. The quick and dirty instructions are to somehow get the SD card hooked up to your computer, either using a built-in SD reader or a peripheral card reader. The Resources section also includes a link to an Embedded Linux Wiki webpage, “RPi Easy SD Card Setup,” which details this copying process for several OSes. Once you have an ISO image downloaded, you can copy it to the SD card. ![]() The Resources section of this article lists several sources including a link to the Adafruit Linux distribution. This saved me some work getting those installed and debugged.īefore you can copy the OS to the SD card, you need to download the ISO image. However, for this project I chose Adafruit Learning Systems’s Occidentalis V0.2 Linux distribution because it had several hardware-hacker features rolled into the distribution, including the kernel modules for the temperature sensor. A couple of other utilities can be used to copy the OS onto the SD card, but I prefer using the command line.Ī Debian-based distribution of Linux seems to be the most commonly used Linux distribution on the Raspberry Pi, with the Raspbian “wheezy” as the recommended distribution. ![]() Windows users can use a utility (e.g., Win32DiskImager) to accomplish the same thing. Linux and Mac OS X users can use the dd command line utility to copy from the OS’s ISO image. The OS has to be copied in such a way that the SD card has a boot sector and the Linux partitioning and file structure is properly maintained. Setting up the SD card is straightforward, but you cannot simply copy the files onto the card. The Raspberry Pi requires a Linux OS compiled to run on an ARM processor, which is the brain of the device, to be installed on an SD card. Finally, we modified the Raspberry Pi case to expose the temperature sensor to the air and installed the device in its permanent location. With all that in place, we then set up the SNMP monitoring software that is configured with a custom MIB and a timed query. Then we configured the SNMP daemon to run the Python script when it is queried. Next, we wrote the Python script that queries the I2C temperature sensor. We started by installing the OS and the various software packages needed. Our first step was to set up the Raspberry Pi. The Raspberry Pi uses the I2C protocol to query the Texas Instruments TMP102 temperature sensor. As budget and time permit, we will be installing more of these onto our network.”įigure 1: The system is designed around the Raspberry Pi SBC. “It has been interesting to see how the temperature fluctuates with the time of day and the level of network activity. “The prototype Raspberry Pi has now been running since September 2012 without any problems,” he says in his article. Setting up the SBC and Linux was simple, Anderson says. “I installed a Debian Linux distro, added an I 2C TMP102 temperature sensor from SparkFun Electronics, wrote a small Python program to get the temperature via I 2C and convert it to Fahrenheit, installed an SNMP server on Linux, added a custom SNMP rule to display the temperature from the script, and finally wrote a custom SNMP MIB to access the temperature information as a string and integer.” The article walks readers through each phase of the project: “We chose the Raspberry Pi because it was less expensive, we had several on hand, and I wanted to see what I could do with it,” Anderson says (see Photo 1). His Raspberry Pi-based solution is the subject of an article appearing in Circuit Cellar’s April issue. Its many I/O ports make it very useful for embedded devices that need a little more power than the typical 8-bit microcontroller. ![]() Photo 1: The Raspberry Pi is a small SBC based on an ARM processor. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |