I am running the following code and I would like to write a "C" character to the 3rd digit on the display? I was wondering to C in hex is "12" but this is bot working with this library.
Code: Select all
import Adafruit_BBIO.ADC as ADC
import time
import datetime
from Adafruit_LED_Backpack import SevenSegment
segment = SevenSegment.SevenSegment(address=0x70, busnum=2)
# Initialize the display. Must be called once before using the display.
segment.begin()
print "Press CTRL+Z to exit"
sensor_pin = 'P9_39'
ADC.setup()
while(True):
reading = ADC.read(sensor_pin)
millivolts = reading * 1800
temp_c = (millivolts - 500) / 10
segment.set_digit(0, int(temp_c / 10))
segment.set_digit(1, int(temp_c % 10))
segment.set_digit(3, 1) [color=#FF0040]#How to write "C"?[/color]
segment.set_colon(1)
# Write the display buffer to the hardware. This must be called to
# update the actual display LEDs.
segment.write_display()
time.sleep(1)
Thanks for your help.