My Experiments with Raspberry Pi: Part 1
Today I am going to run a 7 segment display off of raspberry pi 4. The code I ran #!/usr/bin/env python import RPi.GPIO as GPIO import time pins = [11,12,13,15,16,18,22,7] dats = [0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71,0x80] def setup(): GPIO.setmode(GPIO.BOARD) for pin in pins: GPIO.setup(pin, GPIO.OUT) # Set pin mode as output GPIO.output(pin, GPIO.LOW) def writeOneByte(val): GPIO.output(11, val & (0x01 << 0)) GPIO.output(12, val & (0x01 << 1)) GPIO.output(13, val & (0x01 << 2)) GPIO....