• In this example we will flash an RGB LED using C Schematics Here is a schematic and layout Code This example requires wiringPi to be installed – http://wiringpi.com/download-and-install/ [codesyntax lang=”c”] #include <wiringPi.h> #include <stdio.h> #define REDLED 0 #define GREENLED 1 #define BLUELED 2 void init(void) {…

  • This is a follow on from the Raspberry PI and python example – http://www.pibits.net/code/raspberry-pi-and-74hc595-python-example.php This example uses wiringPi Schematic Code This example is C++, it will flash an LED one at a time connected to the 74HC595 Call this shift.c [codesyntax lang=”cpp”] #include <wiringPi.h> #include <stdio.h>…

  • In this example we expand the amount of outputs using a 74HC595 The 74HC595; 74HCT595 are 8-stage serial shift registers with a storage register and 3-state outputs. The registers have separate clocks. Data is shifted on the positive-going transitions of the shift register clock input…

  • The BMP180 is the new digital barometric pressure sensor of Bosch Sensortec, with a very high performance, which enables applications in advanced mobile devices, such as smart phones, tablet PCs and sports devices. It follows the BMP085 and brings many improvements, like the smaller size…

  • Learning

    Pi and PIR example

    by shedboy71

    In this example we connect a PIR module up to our Raspberry PI, this is quite a simple module to connect as it requires only 5v, Gnd and the output is PI friendly so does not require any level shifting. A passive infrared sensor (PIR…

  • The DHT11 digital temperature and humidity sensor is a composite Sensor contains a calibrated digital signal output of the temperature and humidity. DHT11 uses a simplified single bus communication. Single bus that only one data line, the system of data exchange, control by a single…

  • Code

    DS18b20 python example

    by shedboy71

    This is follow on from the DS18b20 terminal example at http://www.pibits.net/learning/120.php , this time a python example Code [codesyntax lang=”python”] import os import glob import time os.system(‘modprobe w1-gpio’) #load one wire communication device kernel modules os.system(‘modprobe w1-therm’) base_dir = ‘/sys/bus/w1/devices/’ #point to the address device_folder = glob.glob(base_dir…

  • Connect a DS18b20 temperature sensor to your Raspberry PI as follows. I used a breakout for this. In this example we will just be using terminal commands Now you need to enter the following at the command prompt: [codesyntax lang=”bash”] sudo nano /boot/config.txt [/codesyntax] to open…

  • Code

    PCD8554 LCD example

    by shedboy71

    In this example we will write some text on a PCD8554 LCD display, this is also commonly known as the Nokia 5100 LCD and is quite a common LCD which can be found in many Arduino projects. It frequently comes as an LCD which you…

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More