ラズベリーでは、Adafruit CharLCD を使用してこのメッセージを受け取ります。文字列でなければならない引数について話している理由がわかりません..
Traceback (most recent call last):
File "./lcd.py", line 52, in <module>
main()
File "./lcd.py", line 39, in main
lcd = LCD.Adafruit_CharLCD(lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7, lcd_columns, lcd_rows, lcd_backlight)
File "build/bdist.linux-armv7l/egg/Adafruit_CharLCD/Adafruit_CharLCD.py", line 143, in __init__
File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/GPIO.py", line 278, in setup
TypeError: argument 1 must be string, not int
これが私のコードです:
#LCD variables
lcd_rs= 18
lcd_en= 23
lcd_d4= 12
lcd_d5= 16
lcd_d6= 20
lcd_d7= 21
lcd_backlight= 4
lcd_columns= 16
lcd_rows= 2
lcd = LCD.Adafruit_CharLCD(lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7, lcd_columns, lcd_rows, lcd_backlight)
lcd.message('Humidite %s' %(humidity))