#! /usr/bin/python3 import smbus import time bus = smbus.SMBus(1) # Match the arduino SLAVE_ADDRESS = 0x04 #def writeNumber(value): # bus.write_byte(SLAVE_ADDRESS, value) # return -1 # #def readNumber(): # number = bus.read_byte(SLAVE_ADDRESS) # return number while True: var = input("Enter asdwrf :") if not var: continue bus.write_byte(SLAVE_ADDRESS, ord(var[0])) print("Sent '{}' to pi.".format(ord(var[0])))