For a newer raspian you might want to run raspi-config and use the advanced options to enable the SPI driver instead of editing /etc/modprobe.d/nf. Note that this is for a somewhat dated Raspbian running on one of my old B models. # now let's build and install the python-spi library # update our distro and install python development tools # make sure the spi driver will be loaded Now we need to configure the pi to enable the SPI driver. I chose a 1K ohm resistor as that seemed sufficient to limit any current flow. I read several different web references on which resistor to use, with recommended values from 470 ohm to 10k ohm. If we ever entered a state, perhaps due to a programming error where the pi and the VFD were both outputting to the same pin with different values, a high amount of current could flow and the GPIO could become damaged. The Pi on the other hand has a dedicated send pin (19) and receive pin (21). Pin #2 on the VFD is biderectional - sometimes it’s used to send data while other times it’s used to receive data. The reason for this is that we’re interfacing a 3-pin SPI device to a 4-pin SPI device. Note the resistor inserted on the connection to Raspberry Pi ping #19 (MOSI). The VFD display requires two pins for power (+5V, GND) and three pins for IO (SI/SO, SCK, STB). Note that we’re viewing the module from the back side, so pin 1 of CN1 is to the left and pin 6 is to the right. I was able to pick up this display for $35 on ebay.Ĭlick the diagram above to get a larger, more readable version. Using an SPI interface only consumes three or four of the pi’s pins depending on how you wire it. This is a 2×16 character display that interfaces via SPI or Parallel. The first thing to do was to select an appropriate display. They often have a blue/green character color. They differ from LCDs in that LCD displays typically have a backlight whereas a VFD emits light directly, in a similar manner to how a fluorescent light works. VFDs are an older technology that has existed since the early 1960s. VFD stands for “Vacuum Fluorescent Display”. I figured just to be different I would try a VFD display. There were many options for a display - I could go with an LCD, an OLED, etc. I’m in the process of building a home automation controller using my Raspberry Pi, and I figured it would be cool if it could display the current song and artist on my Pandora player.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |