• Benvenuti su RaspberryItaly!
Benvenuto ospite! Login Login con Facebook Registrati Login with Facebook


Valutazione discussione:
  • 0 voto(i) - 0 media
  • 1
  • 2
  • 3
  • 4
  • 5

[-]
Tags
rpi blynk hc 2inch13 zero sr04 display w epaper

rpi zero w/blynk/hc-sr04/2inch13 epaper display
#21
Mamma mia che complicazione.
perchè gestisci a basso livello il sensore?
usa una libreria:
Codice:
from gpiozero import DistanceSensor
from time import sleep

sensore = DistanceSensor(echo=18, trigger=17)
while True:
    print('Distanza: ', sensore.distance * 100)
    sleep(1)
giusto per farti capire..
al posto del print metti un ciclo for che ripeta 10 volte la misura e poi faccia la media troncata
Risposta
#22
Grazie !!! Ci provo


Inviato dal mio iPad utilizzando Tapatalk
Risposta
#23
(01/10/2017, 00:13)Zzed Ha scritto: Mamma mia che complicazione.
perchè gestisci a basso livello il sensore?
usa una libreria:
Codice:
from gpiozero import DistanceSensor
from time import sleep

sensore = DistanceSensor(echo=18, trigger=17)
while True:
   print('Distanza: ', sensore.distance * 100)
   sleep(1)
giusto per farti capire..
al posto del print metti un ciclo for che ripeta 10 volte la misura e poi faccia la media troncata

buongiorno, 
usando "gpiozero" non riesco a far funzionare hc-sr04 ma ho risultati soddisfacenti ,invece, utilizzando "sensor"

questo il codice per la misura e la media

Codice:
from hcsr04sensor import sensor
import time

# Created by Al Audet
# MIT License

def misuraEmedia():
   '''Calculate the distance of an object in centimeters using a HCSR04 sensor
      and a Raspberry Pi. This script allows for a quicker reading by
      decreasing the number of samples and forcing the readings to be
      taken at quicker intervals.'''

   trig_pin = 18
   echo_pin = 27

   #  Create a distance reading with the hcsr04 sensor module
   value = sensor.Measurement(trig_pin, echo_pin)

   # The default sample_size is 11 and sample_wait is 0.1
   # Increase speed by lowering the sample_size and sample_wait
   # The effect of reducing sample_size is larger variance in readings
   # The effect of lowering sample_wait is higher cpu usage and sensor
   # instability if you push it with too fast of a value.
   # These two options have been added to allow you to tweak a
   # more optimal setting for your application.

   # e.g.
   raw_measurement = value.raw_distance(sample_size=5, sample_wait=0.1)

   # Calculate the distance in centimeters
   metric_distance = value.distance_metric(raw_measurement)
   print("The Distance = {} centimeters".format(metric_distance))

while True:
   misuraEmedia()
   #time.sleep(0.1)

a schermo ora ho un numero soddisfacente di misure mediate...

adesso sto cercando di visualizzare il dato sull'Epaper col font che ho scelto (digital-7.ttf).... non sapendo come trasformare un font .ttf in array, ho provato con le immagini.... ma credo che utilizzando un array per il font sia tutto molto piu veloce... o no?

questa una prova di visualizzazione del font scelto (utilizzando le immagini)

Codice:
##
#  @filename   :   main.cpp
#  @brief      :   2.13inch e-paper display demo
#  @author     :   Yehui from Waveshare
#
#  Copyright (C) Waveshare     September 9 2017
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documnetation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to  whom the Software is
# furished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
##

import epd2in13
import time
import Image
import ImageDraw
import ImageFont

epd = epd2in13.EPD()
epd.init(epd.lut_full_update)

# For simplicity, the arguments are explicit numerical coordinates
image = Image.new('1', (epd2in13.EPD_WIDTH, epd2in13.EPD_HEIGHT), 255)  # 255: clear the frame
draw = ImageDraw.Draw(image)
   
epd.clear_frame_memory(0xFF)
epd.set_frame_memory(image, 0, 0)
epd.display_frame()

# for partial update
epd.init(epd.lut_partial_update)

def main():

   image = Image.open('1.bmp')
   epd.clear_frame_memory(0xFF)
   epd.set_frame_memory(image, 0, 0)
   epd.display_frame()
   image = Image.open('2.bmp')
   epd.clear_frame_memory(0xFF)
   epd.set_frame_memory(image, 0, 0)
   epd.display_frame()
   image = Image.open('3.bmp')
   epd.clear_frame_memory(0xFF)
   epd.set_frame_memory(image, 0, 0)
   epd.display_frame()
   image = Image.open('4.bmp')
   epd.clear_frame_memory(0xFF)
   epd.set_frame_memory(image, 0, 0)
   epd.display_frame()
   image = Image.open('5.bmp')
   epd.clear_frame_memory(0xFF)
   epd.set_frame_memory(image, 0, 0)
   epd.display_frame()
   image = Image.open('6.bmp')
   epd.clear_frame_memory(0xFF)
   epd.set_frame_memory(image, 0, 0)
   epd.display_frame()
   image = Image.open('7.bmp')
   epd.clear_frame_memory(0xFF)
   epd.set_frame_memory(image, 0, 0)
   epd.display_frame()
   image = Image.open('8.bmp')
   epd.clear_frame_memory(0xFF)
   epd.set_frame_memory(image, 0, 0)
   epd.display_frame()
   image = Image.open('9.bmp')
   epd.clear_frame_memory(0xFF)
   epd.set_frame_memory(image, 0, 0)
   epd.display_frame()
   image = Image.open('10.bmp')
   epd.clear_frame_memory(0xFF)
   epd.set_frame_memory(image, 0, 0)
   epd.display_frame()
   image = Image.open('cosi.bmp')
   epd.clear_frame_memory(0xFF)
   epd.set_frame_memory(image, 0, 0)
   epd.display_frame()
   image = Image.open('me.bmp')
   epd.clear_frame_memory(0xFF)
   epd.set_frame_memory(image, 0, 0)
   epd.display_frame()
   image = Image.open('cacciano.bmp')
   epd.clear_frame_memory(0xFF)
   epd.set_frame_memory(image, 0, 0)
   epd.display_frame()
   
while True:    
   main()

come faccio (con osx o col rasp) a trasformare un font .ttf in un array da aggiungere al file driver e richiamare dallo script?

buon we
Rpi zero w running 2016-03-18-raspbian-jessie
Rpi 3 b running Openplotter
osx 10.12.5
Risposta
#24
questo il driver:

Codice:
import spidev
import RPi.GPIO as GPIO
import time

"""    Register initial variable     """
EPD2X9 = 0
EPD02X13 = 1
EPD1X54 = 0

if EPD2X9 == 1:
    xDot = 128
    yDot = 296
    DELAYTIME = 1.5
    LUTDefault_full = [0x32,0x02,0x02,0x01,0x11,0x12,0x12,0x22,0x22,0x66,0x69,0x69,0x59,0x58,0x99,0x99,0x88,0x00,0x00,0x00,0x00,0xF8,0xB4,0x13,0x51,0x35,0x51,0x51,0x19,0x01,0x00]
    LUTDefault_part = [0x32,0x10,0x18,0x18,0x08,0x18,0x18,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13,0x14,0x44,0x12,0x00,0x00,0x00,0x00,0x00,0x00]
if EPD02X13 == 1:
    xDot = 122
    yDot = 250
    DELAYTIME = 4
    LUTDefault_full = [0x32,0x22,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x01,0x00,0x00,0x00,0x00]
    LUTDefault_part = [0x32,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
if EPD1X54 == 1:
    xDot = 200
    yDot = 200
    DELAYTIME = 1.5
    LUTDefault_full = [0x32,0x02,0x02,0x01,0x11,0x12,0x12,0x22,0x22,0x66,0x69,0x69,0x59,0x58,0x99,0x99,0x88,0x00,0x00,0x00,0x00,0xF8,0xB4,0x13,0x51,0x35,0x51,0x51,0x19,0x01,0x00]
    LUTDefault_part = [0x32,0x10,0x18,0x18,0x08,0x18,0x18,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13,0x14,0x44,0x12,0x00,0x00,0x00,0x00,0x00,0x00]

GDOControl = [0x01,(yDot-1)%256,(yDot-1)/256,0x00] #for 2.9inch
softstart = [0x0c,0xd7,0xd6,0x9d]
VCOMVol = [0x2c,0xa8]            # VCOM 7c
DummyLine = [0x3a,0x1a]        # 4 dummy line per gate
Gatetime = [0x3b,0x08]            # 2us per line
RamDataEntryMode = [0x11,0x01]    # Ram data entry mode
w_buffer = [0 for i in range(5000)]
"""    Display lib """
Font1206 = [
    [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#" ",0*/
    [0x00,0x00,0x00,0x00,0x3F,0x40,0x00,0x00,0x00,0x00,0x00,0x00],#"!",1*/
    [0x00,0x00,0x30,0x00,0x40,0x00,0x30,0x00,0x40,0x00,0x00,0x00],#""",2*/
    [0x09,0x00,0x0B,0xC0,0x3D,0x00,0x0B,0xC0,0x3D,0x00,0x09,0x00],#"#",3*/
    [0x18,0xC0,0x24,0x40,0x7F,0xE0,0x22,0x40,0x31,0x80,0x00,0x00],#"$",4*/
    [0x18,0x00,0x24,0xC0,0x1B,0x00,0x0D,0x80,0x32,0x40,0x01,0x80],#"%",5*/
    [0x03,0x80,0x1C,0x40,0x27,0x40,0x1C,0x80,0x07,0x40,0x00,0x40],#"&",6*/
    [0x10,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#"'",7*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x80,0x20,0x40,0x40,0x20],#"(",8*/
    [0x00,0x00,0x40,0x20,0x20,0x40,0x1F,0x80,0x00,0x00,0x00,0x00],#")",9*/
    [0x09,0x00,0x06,0x00,0x1F,0x80,0x06,0x00,0x09,0x00,0x00,0x00],#"*",10*/
    [0x04,0x00,0x04,0x00,0x3F,0x80,0x04,0x00,0x04,0x00,0x00,0x00],#"+",11*/
    [0x00,0x10,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#",",12*/
    [0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x00,0x00],#"-",13*/
    [0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#".",14*/
    [0x00,0x20,0x01,0xC0,0x06,0x00,0x38,0x00,0x40,0x00,0x00,0x00],#"/",15*/
    [0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00],#"0",16*/
    [0x00,0x00,0x10,0x40,0x3F,0xC0,0x00,0x40,0x00,0x00,0x00,0x00],#"1",17*/
    [0x18,0xC0,0x21,0x40,0x22,0x40,0x24,0x40,0x18,0x40,0x00,0x00],#"2",18*/
    [0x10,0x80,0x20,0x40,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00],#"3",19*/
    [0x02,0x00,0x0D,0x00,0x11,0x00,0x3F,0xC0,0x01,0x40,0x00,0x00],#"4",20*/
    [0x3C,0x80,0x24,0x40,0x24,0x40,0x24,0x40,0x23,0x80,0x00,0x00],#"5",21*/
    [0x1F,0x80,0x24,0x40,0x24,0x40,0x34,0x40,0x03,0x80,0x00,0x00],#"6",22*/
    [0x30,0x00,0x20,0x00,0x27,0xC0,0x38,0x00,0x20,0x00,0x00,0x00],#"7",23*/
    [0x1B,0x80,0x24,0x40,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00],#"8",24*/
    [0x1C,0x00,0x22,0xC0,0x22,0x40,0x22,0x40,0x1F,0x80,0x00,0x00],#"9",25*/
    [0x00,0x00,0x00,0x00,0x08,0x40,0x00,0x00,0x00,0x00,0x00,0x00],#":",26*/
    [0x00,0x00,0x00,0x00,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00],#";",27*/
    [0x00,0x00,0x04,0x00,0x0A,0x00,0x11,0x00,0x20,0x80,0x40,0x40],#"<",28*/
    [0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x00,0x00],#"=",29*/
    [0x00,0x00,0x40,0x40,0x20,0x80,0x11,0x00,0x0A,0x00,0x04,0x00],#">",30*/
    [0x18,0x00,0x20,0x00,0x23,0x40,0x24,0x00,0x18,0x00,0x00,0x00],#"?",31*/
    [0x1F,0x80,0x20,0x40,0x27,0x40,0x29,0x40,0x1F,0x40,0x00,0x00],#"@",32*/
    [0x00,0x40,0x07,0xC0,0x39,0x00,0x0F,0x00,0x01,0xC0,0x00,0x40],#"A",33*/
    [0x20,0x40,0x3F,0xC0,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00],#"B",34*/
    [0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x30,0x80,0x00,0x00],#"C",35*/
    [0x20,0x40,0x3F,0xC0,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00],#"D",36*/
    [0x20,0x40,0x3F,0xC0,0x24,0x40,0x2E,0x40,0x30,0xC0,0x00,0x00],#"E",37*/
    [0x20,0x40,0x3F,0xC0,0x24,0x40,0x2E,0x00,0x30,0x00,0x00,0x00],#"F",38*/
    [0x0F,0x00,0x10,0x80,0x20,0x40,0x22,0x40,0x33,0x80,0x02,0x00],#"G",39*/
    [0x20,0x40,0x3F,0xC0,0x04,0x00,0x04,0x00,0x3F,0xC0,0x20,0x40],#"H",40*/
    [0x20,0x40,0x20,0x40,0x3F,0xC0,0x20,0x40,0x20,0x40,0x00,0x00],#"I",41*/
    [0x00,0x60,0x20,0x20,0x20,0x20,0x3F,0xC0,0x20,0x00,0x20,0x00],#"J",42*/
    [0x20,0x40,0x3F,0xC0,0x24,0x40,0x0B,0x00,0x30,0xC0,0x20,0x40],#"K",43*/
    [0x20,0x40,0x3F,0xC0,0x20,0x40,0x00,0x40,0x00,0x40,0x00,0xC0],#"L",44*/
    [0x3F,0xC0,0x3C,0x00,0x03,0xC0,0x3C,0x00,0x3F,0xC0,0x00,0x00],#"M",45*/
    [0x20,0x40,0x3F,0xC0,0x0C,0x40,0x23,0x00,0x3F,0xC0,0x20,0x00],#"N",46*/
    [0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00],#"O",47*/
    [0x20,0x40,0x3F,0xC0,0x24,0x40,0x24,0x00,0x18,0x00,0x00,0x00],#"P",48*/
    [0x1F,0x80,0x21,0x40,0x21,0x40,0x20,0xE0,0x1F,0xA0,0x00,0x00],#"Q",49*/
    [0x20,0x40,0x3F,0xC0,0x24,0x40,0x26,0x00,0x19,0xC0,0x00,0x40],#"R",50*/
    [0x18,0xC0,0x24,0x40,0x24,0x40,0x22,0x40,0x31,0x80,0x00,0x00],#"S",51*/
    [0x30,0x00,0x20,0x40,0x3F,0xC0,0x20,0x40,0x30,0x00,0x00,0x00],#"T",52*/
    [0x20,0x00,0x3F,0x80,0x00,0x40,0x00,0x40,0x3F,0x80,0x20,0x00],#"U",53*/
    [0x20,0x00,0x3E,0x00,0x01,0xC0,0x07,0x00,0x38,0x00,0x20,0x00],#"V",54*/
    [0x38,0x00,0x07,0xC0,0x3C,0x00,0x07,0xC0,0x38,0x00,0x00,0x00],#"W",55*/
    [0x20,0x40,0x39,0xC0,0x06,0x00,0x39,0xC0,0x20,0x40,0x00,0x00],#"X",56*/
    [0x20,0x00,0x38,0x40,0x07,0xC0,0x38,0x40,0x20,0x00,0x00,0x00],#"Y",57*/
    [0x30,0x40,0x21,0xC0,0x26,0x40,0x38,0x40,0x20,0xC0,0x00,0x00],#"Z",58*/
    [0x00,0x00,0x00,0x00,0x7F,0xE0,0x40,0x20,0x40,0x20,0x00,0x00],#"[",59*/
    [0x00,0x00,0x70,0x00,0x0C,0x00,0x03,0x80,0x00,0x40,0x00,0x00],#"\",60*/
    [0x00,0x00,0x40,0x20,0x40,0x20,0x7F,0xE0,0x00,0x00,0x00,0x00],#"]",61*/
    [0x00,0x00,0x20,0x00,0x40,0x00,0x20,0x00,0x00,0x00,0x00,0x00],#"^",62*/
    [0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10],#"_",63*/
    [0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#"`",64*/
    [0x00,0x00,0x02,0x80,0x05,0x40,0x05,0x40,0x03,0xC0,0x00,0x40],#"a",65*/
    [0x20,0x00,0x3F,0xC0,0x04,0x40,0x04,0x40,0x03,0x80,0x00,0x00],#"b",66*/
    [0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x40,0x06,0x40,0x00,0x00],#"c",67*/
    [0x00,0x00,0x03,0x80,0x04,0x40,0x24,0x40,0x3F,0xC0,0x00,0x40],#"d",68*/
    [0x00,0x00,0x03,0x80,0x05,0x40,0x05,0x40,0x03,0x40,0x00,0x00],#"e",69*/
    [0x00,0x00,0x04,0x40,0x1F,0xC0,0x24,0x40,0x24,0x40,0x20,0x00],#"f",70*/
    [0x00,0x00,0x02,0xE0,0x05,0x50,0x05,0x50,0x06,0x50,0x04,0x20],#"g",71*/
    [0x20,0x40,0x3F,0xC0,0x04,0x40,0x04,0x00,0x03,0xC0,0x00,0x40],#"h",72*/
    [0x00,0x00,0x04,0x40,0x27,0xC0,0x00,0x40,0x00,0x00,0x00,0x00],#"i",73*/
    [0x00,0x10,0x00,0x10,0x04,0x10,0x27,0xE0,0x00,0x00,0x00,0x00],#"j",74*/
    [0x20,0x40,0x3F,0xC0,0x01,0x40,0x07,0x00,0x04,0xC0,0x04,0x40],#"k",75*/
    [0x20,0x40,0x20,0x40,0x3F,0xC0,0x00,0x40,0x00,0x40,0x00,0x00],#"l",76*/
    [0x07,0xC0,0x04,0x00,0x07,0xC0,0x04,0x00,0x03,0xC0,0x00,0x00],#"m",77*/
    [0x04,0x40,0x07,0xC0,0x04,0x40,0x04,0x00,0x03,0xC0,0x00,0x40],#"n",78*/
    [0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x40,0x03,0x80,0x00,0x00],#"o",79*/
    [0x04,0x10,0x07,0xF0,0x04,0x50,0x04,0x40,0x03,0x80,0x00,0x00],#"p",80*/
    [0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x50,0x07,0xF0,0x00,0x10],#"q",81*/
    [0x04,0x40,0x07,0xC0,0x02,0x40,0x04,0x00,0x04,0x00,0x00,0x00],#"r",82*/
    [0x00,0x00,0x06,0x40,0x05,0x40,0x05,0x40,0x04,0xC0,0x00,0x00],#"s",83*/
    [0x00,0x00,0x04,0x00,0x1F,0x80,0x04,0x40,0x00,0x40,0x00,0x00],#"t",84*/
    [0x04,0x00,0x07,0x80,0x00,0x40,0x04,0x40,0x07,0xC0,0x00,0x40],#"u",85*/
    [0x04,0x00,0x07,0x00,0x04,0xC0,0x01,0x80,0x06,0x00,0x04,0x00],#"v",86*/
    [0x06,0x00,0x01,0xC0,0x07,0x00,0x01,0xC0,0x06,0x00,0x00,0x00],#"w",87*/
    [0x04,0x40,0x06,0xC0,0x01,0x00,0x06,0xC0,0x04,0x40,0x00,0x00],#"x",88*/
    [0x04,0x10,0x07,0x10,0x04,0xE0,0x01,0x80,0x06,0x00,0x04,0x00],#"y",89*/
    [0x00,0x00,0x04,0x40,0x05,0xC0,0x06,0x40,0x04,0x40,0x00,0x00],#"z",90*/
    [0x00,0x00,0x00,0x00,0x04,0x00,0x7B,0xE0,0x40,0x20,0x00,0x00],#"{",91*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xF0,0x00,0x00,0x00,0x00],#"|",92*/
    [0x00,0x00,0x40,0x20,0x7B,0xE0,0x04,0x00,0x00,0x00,0x00,0x00],#"]",93*/
    [0x40,0x00,0x80,0x00,0x40,0x00,0x20,0x00,0x20,0x00,0x40,0x00],#"~",94*/
]

Font1608 = [      
    [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#" ",0*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xCC,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00],#"!",1*/
    [0x00,0x00,0x08,0x00,0x30,0x00,0x60,0x00,0x08,0x00,0x30,0x00,0x60,0x00,0x00,0x00],#""",2*/
    [0x02,0x20,0x03,0xFC,0x1E,0x20,0x02,0x20,0x03,0xFC,0x1E,0x20,0x02,0x20,0x00,0x00],#"#",3*/
    [0x00,0x00,0x0E,0x18,0x11,0x04,0x3F,0xFF,0x10,0x84,0x0C,0x78,0x00,0x00,0x00,0x00],#"$",4*/
    [0x0F,0x00,0x10,0x84,0x0F,0x38,0x00,0xC0,0x07,0x78,0x18,0x84,0x00,0x78,0x00,0x00],#"%",5*/
    [0x00,0x78,0x0F,0x84,0x10,0xC4,0x11,0x24,0x0E,0x98,0x00,0xE4,0x00,0x84,0x00,0x08],#"&",6*/
    [0x08,0x00,0x68,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#"'",7*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xE0,0x18,0x18,0x20,0x04,0x40,0x02,0x00,0x00],#"(",8*/
    [0x00,0x00,0x40,0x02,0x20,0x04,0x18,0x18,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00],#")",9*/
    [0x02,0x40,0x02,0x40,0x01,0x80,0x0F,0xF0,0x01,0x80,0x02,0x40,0x02,0x40,0x00,0x00],#"*",10*/
    [0x00,0x80,0x00,0x80,0x00,0x80,0x0F,0xF8,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x00],#"+",11*/
    [0x00,0x01,0x00,0x0D,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#",",12*/
    [0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80],#"-",13*/
    [0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#".",14*/
    [0x00,0x00,0x00,0x06,0x00,0x18,0x00,0x60,0x01,0x80,0x06,0x00,0x18,0x00,0x20,0x00],#"/",15*/
    [0x00,0x00,0x07,0xF0,0x08,0x08,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00],#"0",16*/
    [0x00,0x00,0x08,0x04,0x08,0x04,0x1F,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00],#"1",17*/
    [0x00,0x00,0x0E,0x0C,0x10,0x14,0x10,0x24,0x10,0x44,0x11,0x84,0x0E,0x0C,0x00,0x00],#"2",18*/
    [0x00,0x00,0x0C,0x18,0x10,0x04,0x11,0x04,0x11,0x04,0x12,0x88,0x0C,0x70,0x00,0x00],#"3",19*/
    [0x00,0x00,0x00,0xE0,0x03,0x20,0x04,0x24,0x08,0x24,0x1F,0xFC,0x00,0x24,0x00,0x00],#"4",20*/
    [0x00,0x00,0x1F,0x98,0x10,0x84,0x11,0x04,0x11,0x04,0x10,0x88,0x10,0x70,0x00,0x00],#"5",21*/
    [0x00,0x00,0x07,0xF0,0x08,0x88,0x11,0x04,0x11,0x04,0x18,0x88,0x00,0x70,0x00,0x00],#"6",22*/
    [0x00,0x00,0x1C,0x00,0x10,0x00,0x10,0xFC,0x13,0x00,0x1C,0x00,0x10,0x00,0x00,0x00],#"7",23*/
    [0x00,0x00,0x0E,0x38,0x11,0x44,0x10,0x84,0x10,0x84,0x11,0x44,0x0E,0x38,0x00,0x00],#"8",24*/
    [0x00,0x00,0x07,0x00,0x08,0x8C,0x10,0x44,0x10,0x44,0x08,0x88,0x07,0xF0,0x00,0x00],#"9",25*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,0x00],#":",26*/
    [0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#";",27*/
    [0x00,0x00,0x00,0x80,0x01,0x40,0x02,0x20,0x04,0x10,0x08,0x08,0x10,0x04,0x00,0x00],#"<",28*/
    [0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x00,0x00],#"=",29*/
    [0x00,0x00,0x10,0x04,0x08,0x08,0x04,0x10,0x02,0x20,0x01,0x40,0x00,0x80,0x00,0x00],#">",30*/
    [0x00,0x00,0x0E,0x00,0x12,0x00,0x10,0x0C,0x10,0x6C,0x10,0x80,0x0F,0x00,0x00,0x00],#"?",31*/
    [0x03,0xE0,0x0C,0x18,0x13,0xE4,0x14,0x24,0x17,0xC4,0x08,0x28,0x07,0xD0,0x00,0x00],#"@",32*/
    [0x00,0x04,0x00,0x3C,0x03,0xC4,0x1C,0x40,0x07,0x40,0x00,0xE4,0x00,0x1C,0x00,0x04],#"A",33*/
    [0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x04,0x11,0x04,0x0E,0x88,0x00,0x70,0x00,0x00],#"B",34*/
    [0x03,0xE0,0x0C,0x18,0x10,0x04,0x10,0x04,0x10,0x04,0x10,0x08,0x1C,0x10,0x00,0x00],#"C",35*/
    [0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00],#"D",36*/
    [0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x04,0x17,0xC4,0x10,0x04,0x08,0x18,0x00,0x00],#"E",37*/
    [0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x00,0x17,0xC0,0x10,0x00,0x08,0x00,0x00,0x00],#"F",38*/
    [0x03,0xE0,0x0C,0x18,0x10,0x04,0x10,0x04,0x10,0x44,0x1C,0x78,0x00,0x40,0x00,0x00],#"G",39*/
    [0x10,0x04,0x1F,0xFC,0x10,0x84,0x00,0x80,0x00,0x80,0x10,0x84,0x1F,0xFC,0x10,0x04],#"H",40*/
    [0x00,0x00,0x10,0x04,0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x04,0x00,0x00,0x00,0x00],#"I",41*/
    [0x00,0x03,0x00,0x01,0x10,0x01,0x10,0x01,0x1F,0xFE,0x10,0x00,0x10,0x00,0x00,0x00],#"J",42*/
    [0x10,0x04,0x1F,0xFC,0x11,0x04,0x03,0x80,0x14,0x64,0x18,0x1C,0x10,0x04,0x00,0x00],#"K",43*/
    [0x10,0x04,0x1F,0xFC,0x10,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x0C,0x00,0x00],#"L",44*/
    [0x10,0x04,0x1F,0xFC,0x1F,0x00,0x00,0xFC,0x1F,0x00,0x1F,0xFC,0x10,0x04,0x00,0x00],#"M",45*/
    [0x10,0x04,0x1F,0xFC,0x0C,0x04,0x03,0x00,0x00,0xE0,0x10,0x18,0x1F,0xFC,0x10,0x00],#"N",46*/
    [0x07,0xF0,0x08,0x08,0x10,0x04,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00],#"O",47*/
    [0x10,0x04,0x1F,0xFC,0x10,0x84,0x10,0x80,0x10,0x80,0x10,0x80,0x0F,0x00,0x00,0x00],#"P",48*/
    [0x07,0xF0,0x08,0x18,0x10,0x24,0x10,0x24,0x10,0x1C,0x08,0x0A,0x07,0xF2,0x00,0x00],#"Q",49*/
    [0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x00,0x11,0xC0,0x11,0x30,0x0E,0x0C,0x00,0x04],#"R",50*/
    [0x00,0x00,0x0E,0x1C,0x11,0x04,0x10,0x84,0x10,0x84,0x10,0x44,0x1C,0x38,0x00,0x00],#"S",51*/
    [0x18,0x00,0x10,0x00,0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x00,0x18,0x00,0x00,0x00],#"T",52*/
    [0x10,0x00,0x1F,0xF8,0x10,0x04,0x00,0x04,0x00,0x04,0x10,0x04,0x1F,0xF8,0x10,0x00],#"U",53*/
    [0x10,0x00,0x1E,0x00,0x11,0xE0,0x00,0x1C,0x00,0x70,0x13,0x80,0x1C,0x00,0x10,0x00],#"V",54*/
    [0x1F,0xC0,0x10,0x3C,0x00,0xE0,0x1F,0x00,0x00,0xE0,0x10,0x3C,0x1F,0xC0,0x00,0x00],#"W",55*/
    [0x10,0x04,0x18,0x0C,0x16,0x34,0x01,0xC0,0x01,0xC0,0x16,0x34,0x18,0x0C,0x10,0x04],#"X",56*/
    [0x10,0x00,0x1C,0x00,0x13,0x04,0x00,0xFC,0x13,0x04,0x1C,0x00,0x10,0x00,0x00,0x00],#"Y",57*/
    [0x08,0x04,0x10,0x1C,0x10,0x64,0x10,0x84,0x13,0x04,0x1C,0x04,0x10,0x18,0x00,0x00],#"Z",58*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFE,0x40,0x02,0x40,0x02,0x40,0x02,0x00,0x00],#"[",59*/
    [0x00,0x00,0x30,0x00,0x0C,0x00,0x03,0x80,0x00,0x60,0x00,0x1C,0x00,0x03,0x00,0x00],#"\",60*/
    [0x00,0x00,0x40,0x02,0x40,0x02,0x40,0x02,0x7F,0xFE,0x00,0x00,0x00,0x00,0x00,0x00],#"]",61*/
    [0x00,0x00,0x00,0x00,0x20,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x00,0x00],#"^",62*/
    [0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01],#"_",63*/
    [0x00,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#"`",64*/
    [0x00,0x00,0x00,0x98,0x01,0x24,0x01,0x44,0x01,0x44,0x01,0x44,0x00,0xFC,0x00,0x04],#"a",65*/
    [0x10,0x00,0x1F,0xFC,0x00,0x88,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x70,0x00,0x00],#"b",66*/
    [0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x00],#"c",67*/
    [0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x11,0x08,0x1F,0xFC,0x00,0x04],#"d",68*/
    [0x00,0x00,0x00,0xF8,0x01,0x44,0x01,0x44,0x01,0x44,0x01,0x44,0x00,0xC8,0x00,0x00],#"e",69*/
    [0x00,0x00,0x01,0x04,0x01,0x04,0x0F,0xFC,0x11,0x04,0x11,0x04,0x11,0x00,0x18,0x00],#"f",70*/
    [0x00,0x00,0x00,0xD6,0x01,0x29,0x01,0x29,0x01,0x29,0x01,0xC9,0x01,0x06,0x00,0x00],#"g",71*/
    [0x10,0x04,0x1F,0xFC,0x00,0x84,0x01,0x00,0x01,0x00,0x01,0x04,0x00,0xFC,0x00,0x04],#"h",72*/
    [0x00,0x00,0x01,0x04,0x19,0x04,0x19,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00],#"i",73*/
    [0x00,0x00,0x00,0x03,0x00,0x01,0x01,0x01,0x19,0x01,0x19,0xFE,0x00,0x00,0x00,0x00],#"j",74*/
    [0x10,0x04,0x1F,0xFC,0x00,0x24,0x00,0x40,0x01,0xB4,0x01,0x0C,0x01,0x04,0x00,0x00],#"k",75*/
    [0x00,0x00,0x10,0x04,0x10,0x04,0x1F,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00],#"l",76*/
    [0x01,0x04,0x01,0xFC,0x01,0x04,0x01,0x00,0x01,0xFC,0x01,0x04,0x01,0x00,0x00,0xFC],#"m",77*/
    [0x01,0x04,0x01,0xFC,0x00,0x84,0x01,0x00,0x01,0x00,0x01,0x04,0x00,0xFC,0x00,0x04],#"n",78*/
    [0x00,0x00,0x00,0xF8,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x00,0xF8,0x00,0x00],#"o",79*/
    [0x01,0x01,0x01,0xFF,0x00,0x85,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x70,0x00,0x00],#"p",80*/
    [0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x01,0x05,0x01,0xFF,0x00,0x01],#"q",81*/
    [0x01,0x04,0x01,0x04,0x01,0xFC,0x00,0x84,0x01,0x04,0x01,0x00,0x01,0x80,0x00,0x00],#"r",82*/
    [0x00,0x00,0x00,0xCC,0x01,0x24,0x01,0x24,0x01,0x24,0x01,0x24,0x01,0x98,0x00,0x00],#"s",83*/
    [0x00,0x00,0x01,0x00,0x01,0x00,0x07,0xF8,0x01,0x04,0x01,0x04,0x00,0x00,0x00,0x00],#"t",84*/
    [0x01,0x00,0x01,0xF8,0x00,0x04,0x00,0x04,0x00,0x04,0x01,0x08,0x01,0xFC,0x00,0x04],#"u",85*/
    [0x01,0x00,0x01,0x80,0x01,0x70,0x00,0x0C,0x00,0x10,0x01,0x60,0x01,0x80,0x01,0x00],#"v",86*/
    [0x01,0xF0,0x01,0x0C,0x00,0x30,0x01,0xC0,0x00,0x30,0x01,0x0C,0x01,0xF0,0x01,0x00],#"w",87*/
    [0x00,0x00,0x01,0x04,0x01,0x8C,0x00,0x74,0x01,0x70,0x01,0x8C,0x01,0x04,0x00,0x00],#"x",88*/
    [0x01,0x01,0x01,0x81,0x01,0x71,0x00,0x0E,0x00,0x18,0x01,0x60,0x01,0x80,0x01,0x00],#"y",89*/
    [0x00,0x00,0x01,0x84,0x01,0x0C,0x01,0x34,0x01,0x44,0x01,0x84,0x01,0x0C,0x00,0x00],#"z",90*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x3E,0xFC,0x40,0x02,0x40,0x02],#"{",91*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00],#"|",92*/
    [0x00,0x00,0x40,0x02,0x40,0x02,0x3E,0xFC,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#"]",93*/
    [0x00,0x00,0x60,0x00,0x80,0x00,0x80,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x20,0x00],#"~",94*/
]

progress_head = [
    0x00,0x00,0x00,0x00,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,
    0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,
]
progress_zero = [
    0x00,0x00,0x00,0x00,0x3F,0xFC,0x3F,0xFC,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,
    0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,
    ]
progress_start = [
    0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,
    0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,
    ]
progress_Spare = [
    0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,
    0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC
    ]
progress_full = [
    0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,
    0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x3F,0xFC,0x3F,0xFC,0x00,0x00,0x00,0x00,
    ]
progress_end = [
    0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,
    0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x00,0x00,0x00,0x00,
]

""" BCM GPIO """
RST = 17
DC = 25
BUSY = 24
CS = 8

class EPD_driver(object):
    def __init__(self,spi):
        #Initialize DC RST pin
        GPIO.setmode(GPIO.BCM)
        GPIO.setwarnings(False)
        GPIO.setup(RST,GPIO.OUT)
        GPIO.setup(DC,GPIO.OUT)
        GPIO.setup(CS,GPIO.OUT)
        GPIO.setup(BUSY,GPIO.IN)
        #Initialize SPI
        self._spi = spi
        self._spi.max_speed_hz = 2000000
        self._spi.mode = 0b00
        
    def ReadBusy(self):
        for i in range(0,400):
            if GPIO.input(BUSY)==0:
                print 'Busy is Low'
                return 1
            time.sleep(0.01)
    def EPD_WriteCMD(self,command):
        GPIO.output(DC,GPIO.LOW)
        #print 'send command : ' ,hex(command)
        self._spi.writebytes([command])
    def EPD_WriteCMD_p1(self,command,para):
        self.ReadBusy()
        GPIO.output(DC,GPIO.LOW)
        #print 'send command : ' ,hex(command)
        self._spi.writebytes([command])
        GPIO.output(DC,GPIO.HIGH)
        #print 'Sent to data : ' ,hex(para),
        self._spi.writebytes([para])
    def EPD_POWERON(self):
        self.EPD_WriteCMD_p1(0x22,0xc0)
        self.EPD_WriteCMD(0x20)
    def EPD_Write(self,value):
        """Send command byte to display"""
        GPIO.output(DC,GPIO.LOW)
        time.sleep(0.01)
        #print 'send command : ' ,hex(value[0])
        self._spi.writebytes([value[0]])   #The first byte is written with the command value
        GPIO.output(DC,GPIO.HIGH)
        for i in range(0,len(value)-1):
            data = value[i+1]
            self._spi.writebytes([data])
    def EPD_WriteDispRam(self,XSize,YSize,Dispbuff):
        if XSize%8!=0 :
            XSize = XSize+(8-XSize%8)
        XSize = XSize/8
        NUM = 0
        self.ReadBusy()
        GPIO.output(DC,GPIO.LOW)
        self._spi.writebytes([0x24])
        GPIO.output(DC,GPIO.HIGH)
        for i in range(0,YSize):
            for j in range(0,XSize):
                self._spi.writebytes([Dispbuff[NUM]])
                NUM = NUM +1
                #print hex(Dispbuff[i+j]),
        #print ''
    def EPD_WriteDispRamMono(self,XSize,YSize,dispdata):
        if XSize%8!=0 :
            XSize = XSize+(8-XSize%8)
        XSize = XSize/8
        NUM = 0
        self.ReadBusy()
        #print 'send command : ' ,hex(0x24)
        GPIO.output(DC,GPIO.LOW)
        self._spi.writebytes([0x24])
        GPIO.output(DC,GPIO.HIGH)
        #print 'Sent to data : ',hex(dispdata),
        if isinstance(dispdata,list):
            for i in range(0,YSize):
                for j in range(0,XSize):
                    self._spi.writebytes([dispdata[NUM]])
                    NUM = NUM +1
                    #print hex(dispdata[i+j]),
        else:
            #print 'send data : ' ,dispdata
            for i in range(0,YSize):
                for j in range(0,XSize):
                    self._spi.writebytes([dispdata])    
    def EPD_SetRamArea(self,Xstart,Xend,Ystart,Ystart1,Yend,Yend1):
        RamAreaX = []
        RamAreaY = []
        RamAreaX.extend([0x44,Xstart,Xend])
        RamAreaY.extend([0x45,Ystart,Ystart1,Yend,Yend1])
        self.EPD_Write(RamAreaX)
        self.EPD_Write(RamAreaY)
    def EPD_SetRamPointer(self,addrX,addrY,addrY1):
        RamPointerX = []
        RamPointerY = []
        RamPointerX.extend([0x4e,addrX])
        RamPointerY.extend([0x4f,addrY,addrY1])
        self.EPD_Write(RamPointerX)
        self.EPD_Write(RamPointerY)
    def part_display(self,RAM_XST,RAM_XEND,RAM_YST,RAM_YST1,RAM_YEND,RAM_YEND1):
        self.EPD_SetRamArea(RAM_XST,RAM_XEND,RAM_YST,RAM_YST1,RAM_YEND,RAM_YEND1)
        self.EPD_SetRamPointer(RAM_XST,RAM_YST,RAM_YST1)
    def EPD_Init(self):
        """Initialize dispaly"""
        """2.reset driver"""
        GPIO.output(CS,GPIO.LOW)
        GPIO.output(RST,GPIO.HIGH)
        time.sleep(0.1)
        GPIO.output(RST,GPIO.LOW)
        if GPIO.input(RST) == 0:
            print  'Reset is complete'
        else:
            print  'Reset is flase'
        time.sleep(0.01)
        GPIO.output(RST,GPIO.HIGH)
        """3.set register"""
        print  '***********set register Start**********'
        self.EPD_Write(GDOControl)    # Pannel configuration, Gate selection
        self.EPD_Write(softstart)    # X decrease, Y decrease
        self.EPD_Write(VCOMVol)        # VCOM setting
        self.EPD_Write(DummyLine)    # dummy line per gate
        self.EPD_Write(Gatetime)        # Gage time setting
        self.EPD_Write(RamDataEntryMode)    # X increase, Y decrease
        self.EPD_SetRamArea(0x00,(xDot-1)/8,(yDot-1)%256,(yDot-1)/256,0x00,0x00)    # X-source area,Y-gage area
        self.EPD_SetRamPointer(0x00,(yDot-1)%256,(yDot-1)/256)    # set ram        
        print  '***********set register  end**********'
    def EPD_Update(self):
        self.EPD_WriteCMD_p1(0x22,0xc7)
        self.EPD_WriteCMD(0x20)
        self.EPD_WriteCMD(0xff)
    def EPD_Update_Part(self):
        self.EPD_WriteCMD_p1(0x22,0x04)
        self.EPD_WriteCMD(0x20)
        self.EPD_WriteCMD(0xff)
    def EPD_init_Full(self):
        self.EPD_Init()
        self.EPD_Write(LUTDefault_full)
        self.EPD_POWERON()
    def EPD_init_Part(self):
        #GPIO.output(CS,GPIO.LOW)
        self.EPD_Init()
        self.EPD_Write(LUTDefault_part)
        self.EPD_POWERON()
    def EPD_Dis_Full(self,DisBuffer,Label):
        self.EPD_SetRamPointer(0x00,(yDot-1)%256,(yDot-1)/256)
        if Label == 0 :
            self.EPD_WriteDispRamMono(xDot, yDot, 0xff)
        else:
            if isinstance(DisBuffer,list):
                print 'is list'
            else:
                print 'not list'
            self.EPD_WriteDispRam(xDot, yDot, DisBuffer)
        self.EPD_Update()
    def EPD_Dis_Part(self,xStart,xEnd,yStart,yEnd,DisBuffer,Label)    :
        if Label == 0 :
            self.part_display(xStart/8,xEnd/8,yEnd%256,yEnd/256,yStart%256,yStart/256)
            self.EPD_WriteDispRamMono(xEnd-xStart, yEnd-yStart+1, DisBuffer)    
             self.EPD_Update_Part()
            time.sleep(0.5)
            self.part_display(xStart/8,xEnd/8,yEnd%256,yEnd/256,yStart%256,yStart/256)    
            self.EPD_WriteDispRamMono(xEnd-xStart, yEnd-yStart+1, DisBuffer)
        else:
            self.part_display(xStart/8,xEnd/8,yEnd%256,yEnd/256,yStart%256,yStart/256)
            self.EPD_WriteDispRam(xEnd-xStart, yEnd-yStart+1, DisBuffer)    
             self.EPD_Update_Part()
            time.sleep(0.5)
            self.part_display(xStart/8,xEnd/8,yEnd%256,yEnd/256,yStart%256,yStart/256)    
            self.EPD_WriteDispRam(xEnd-xStart, yEnd-yStart+1, DisBuffer)

    """***********************************************************************************************************************
                ------------------------------------------------------------------------
                |\\\                                                                ///|
                |\\\                        App layer                                ///|
                ------------------------------------------------------------------------
    ***********************************************************************************************************************"""
    """********************************************************************************
                    clear full screen
    ********************************************************************************"""
    def Dis_Clear_full(self):
        print '1.init  full screen'
        self.EPD_init_Full()
        time.sleep(DELAYTIME)

        #Clear screen
        print '2.Clear screen'
        m=0xff
        self.EPD_Dis_Full(m,0)  
        time.sleep(DELAYTIME)

    def Dis_Clear_part(self):
        print '1.init part screen'
        self.EPD_init_Part()
        time.sleep(DELAYTIME)

        #Clear screen
        print 'Clear screen'
        m=0xff
        self.EPD_Dis_Part(0,xDot-1,0,yDot-1,m,0)  
        time.sleep(DELAYTIME)
        
    def Dis_full_pic(self,DisBuffer):
        self.EPD_Dis_Full(DisBuffer,1)    
        
    def Dis_part_pic(self,xStart,xEnd,yStart,yEnd,DisBuffer):
        self.EPD_Dis_Part(xStart,xEnd,yStart,yEnd,DisBuffer,1)
    
    """********************************************************************************
    funtion : Select the character size
    parameter :
        acsii : char data
        size : char len
        mode : char mode
        next : char len
    Remarks:
    ********************************************************************************"""
    def Dis_Char(self,acsii,size,mode,next):
        ch = ord(acsii) - 32
        #print "ch =",ch
        if size == 12:
            temp = [0 for i in range(11)]
            temp = Font1206[ch]
        else :        
            temp = [0 for i in range(15)]
            temp = Font1608[ch]
        for i in range(0,size):
            del w_buffer[size*next+i]
            w_buffer.insert(size*next+i,~temp[i]&0xff)
    """********************************************************************************
    funtion : write string
    parameter :
        x : x start address
        y : y start address
        pString : Display data
        Size : char len
    Remarks:
    ********************************************************************************"""
    def Dis_String(self,x,y,pString,Size):
        len_s = 0
        x_addr = x
        y_addr = y
        #1.Remove the character and determine the character size
        while len_s < len(pString):
            if (x > (xDot- Size / 2)):
                x = 0
                y = y + Size
                if (y > (yDot- Size)):
                    y = x = 0
            new_string =  pString[len_s:len_s+1]
            self.Dis_Char(new_string, Size, 0,len_s)
            x = x + Size / 2
            len_s = len_s + 1        #Calculate the current number for the first few characters
        #2.show
        if Size == 12:
            self.EPD_Dis_Part(y_addr+1,y_addr+Size/2,yDot-(Size*len_s)-x_addr+1,yDot-x_addr,w_buffer,1)
        else:
            self.EPD_Dis_Part(y_addr+1,y_addr+Size/2,yDot-(Size*len_s)-x_addr+1,yDot-x_addr,w_buffer,1)
    """********************************************************************************
    funtion : Drawing pic
    parameter :
        xStart : x start address
        yStart : y start address
        DisBuffer : Display data
        xSize : Displays the x length of the image
        ySize : Displays the y length of the image
    Remarks:
        The sample image is 32 * 32
    ********************************************************************************"""
    def Dis_Drawing(self,xStart,yStart,DisBuffer,xSize,ySize):
        x_addr = xStart*8
        y_addr = yStart*8
        self.EPD_Dis_Part(y_addr,y_addr+xSize-1,yDot-ySize-x_addr,yDot-x_addr-1,DisBuffer,1)
    """********************************************************************************
    funtion : show Progress
    parameter :
        progress_len : Progress bar length    
    ********************************************************************************"""
    def Dis_Progress(self,progress_len):
        y = 0
        pheight_pix = 2
        pWidth_pix = 16
        w_buffer = [0xff for i in range(0,5000)]
        #1.Initialize the progress bar length and place it in the center of the lower end of the display
        for z in range(0,progress_len):
            for x in range(0,pWidth_pix*pheight_pix):
                if(z == 0):
                    temp = [0 for i in range(pheight_pix*pWidth_pix-1)]
                    temp = progress_head
                    del w_buffer[y]
                    w_buffer.insert(y,temp[x])                    
                    y = y + 1
                elif(z == progress_len -1):
                    temp = [0 for i in range(pheight_pix*pWidth_pix-1)]
                    temp = progress_end
                    del w_buffer[y]
                    w_buffer.insert(y,temp[x])                    
                    y = y + 1
                else:
                    temp = [0 for i in range(pheight_pix*pWidth_pix-1)]
                    temp = progress_Spare
                    del w_buffer[y]
                    w_buffer.insert(y,temp[x])                    
                    y = y + 1
        self.EPD_Dis_Part(xDot-xDot/16-5,xDot-xDot/16+4,(yDot-16*progress_len)/2-1,(yDot-16*progress_len)/2-1+16*progress_len,w_buffer,1)
        #2.Load progress bar
        y =0
        for z in range(0,progress_len):
            for x in range(0,pWidth_pix*pheight_pix):
                if(z == 0):
                    temp = [0 for i in range(pheight_pix*pWidth_pix-1)]
                    temp = progress_zero
                    del w_buffer[y]
                    w_buffer.insert(y,temp[x])                    
                    y = y + 1
                elif(z == progress_len-1):
                    temp = [0 for i in range(pheight_pix*pWidth_pix-1)]
                    temp = progress_full
                    del w_buffer[y]
                    w_buffer.insert(y,temp[x])
                    y = y + 1
                else:
                    temp = [0 for i in range(pheight_pix*pWidth_pix-1)]
                    temp = progress_start
                    del w_buffer[y]
                    w_buffer.insert(y,temp[x])                    
                    y = y + 1    
            self.EPD_Dis_Part(xDot-xDot/16-5,xDot-xDot/16+4,(yDot-16*progress_len)/2-1,(yDot-16*progress_len)/2-1+16*progress_len,w_buffer,1)
    def Dis_showtime(self,hour,minute,sec):
        len_s = 16
        w_buffer = [0xff for i in range(5000)]
        for z in range(0,8):
            for x in range(0,len_s):
                if z == 0 :
                    temp = [0 for i in range(15)]
                    temp = Font1608[16+hour/10]
                    del w_buffer[x + z *16]
                    w_buffer.insert(x + z *16,~temp[x]&0xff)
                elif z == 1 :
                    temp = [0 for i in range(15)]
                    temp = Font1608[16+hour%10]
                    del w_buffer[x + z *16]
                    w_buffer.insert(x + z *16,~temp[x]&0xff)
                elif z == 2 :
                    temp = [0 for i in range(15)]
                    temp = Font1608[26]
                    del w_buffer[x + z *16]#delete
                    w_buffer.insert(x + z *16,~temp[x]&0xff)
                elif z == 3 :
                    temp = [0 for i in range(15)]
                    temp = Font1608[16+minute/10]
                    del w_buffer[x + z *16]
                    w_buffer.insert(x + z *16,~temp[x]&0xff)
                elif z == 4 :
                    temp = [0 for i in range(15)]
                    temp = Font1608[16+minute%10]
                    del w_buffer[x + z *16]
                    w_buffer.insert(x + z *16,~temp[x]&0xff)
                elif z == 5 :
                    temp = [0 for i in range(15)]
                    temp = Font1608[26]
                    del w_buffer[x + z *16]
                    w_buffer.insert(x + z *16,~temp[x]&0xff)
                elif z == 6 :
                    temp = [0 for i in range(15)]
                    temp = Font1608[16+sec/10]
                    del w_buffer[x + z *16]
                    w_buffer.insert(x + z *16,~temp[x]&0xff)
                elif z == 7 :
                    temp = [0 for i in range(15)]
                    temp = Font1608[16+sec%10]
                    del w_buffer[x + z *16]
                    w_buffer.insert(x + z *16,~temp[x]&0xff)
                else :
                    return 1
        self.EPD_Dis_Part(xDot/10-1,xDot/10+8,(yDot-16*4)/2,(yDot-16*4)/2-1+16*4,w_buffer,1)

quello che dovrei fare è trasformare il font da me scelto in qualche cosa del genere no?
Codice:
Font1206 = [
    [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#" ",0*/
    [0x00,0x00,0x00,0x00,0x3F,0x40,0x00,0x00,0x00,0x00,0x00,0x00],#"!",1*/
    [0x00,0x00,0x30,0x00,0x40,0x00,0x30,0x00,0x40,0x00,0x00,0x00],#""",2*/
    [0x09,0x00,0x0B,0xC0,0x3D,0x00,0x0B,0xC0,0x3D,0x00,0x09,0x00],#"#",3*/
    [0x18,0xC0,0x24,0x40,0x7F,0xE0,0x22,0x40,0x31,0x80,0x00,0x00],#"$",4*/
    [0x18,0x00,0x24,0xC0,0x1B,0x00,0x0D,0x80,0x32,0x40,0x01,0x80],#"%",5*/
    [0x03,0x80,0x1C,0x40,0x27,0x40,0x1C,0x80,0x07,0x40,0x00,0x40],#"&",6*/
    [0x10,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#"'",7*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x80,0x20,0x40,0x40,0x20],#"(",8*/
    [0x00,0x00,0x40,0x20,0x20,0x40,0x1F,0x80,0x00,0x00,0x00,0x00],#")",9*/
    [0x09,0x00,0x06,0x00,0x1F,0x80,0x06,0x00,0x09,0x00,0x00,0x00],#"*",10*/
    [0x04,0x00,0x04,0x00,0x3F,0x80,0x04,0x00,0x04,0x00,0x00,0x00],#"+",11*/
    [0x00,0x10,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#",",12*/
    [0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x00,0x00],#"-",13*/
    [0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#".",14*/
    [0x00,0x20,0x01,0xC0,0x06,0x00,0x38,0x00,0x40,0x00,0x00,0x00],#"/",15*/
    [0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00],#"0",16*/
    [0x00,0x00,0x10,0x40,0x3F,0xC0,0x00,0x40,0x00,0x00,0x00,0x00],#"1",17*/
    [0x18,0xC0,0x21,0x40,0x22,0x40,0x24,0x40,0x18,0x40,0x00,0x00],#"2",18*/
    [0x10,0x80,0x20,0x40,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00],#"3",19*/
    [0x02,0x00,0x0D,0x00,0x11,0x00,0x3F,0xC0,0x01,0x40,0x00,0x00],#"4",20*/
    [0x3C,0x80,0x24,0x40,0x24,0x40,0x24,0x40,0x23,0x80,0x00,0x00],#"5",21*/
    [0x1F,0x80,0x24,0x40,0x24,0x40,0x34,0x40,0x03,0x80,0x00,0x00],#"6",22*/
    [0x30,0x00,0x20,0x00,0x27,0xC0,0x38,0x00,0x20,0x00,0x00,0x00],#"7",23*/
    [0x1B,0x80,0x24,0x40,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00],#"8",24*/
    [0x1C,0x00,0x22,0xC0,0x22,0x40,0x22,0x40,0x1F,0x80,0x00,0x00],#"9",25*/
    [0x00,0x00,0x00,0x00,0x08,0x40,0x00,0x00,0x00,0x00,0x00,0x00],#":",26*/
    [0x00,0x00,0x00,0x00,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00],#";",27*/
    [0x00,0x00,0x04,0x00,0x0A,0x00,0x11,0x00,0x20,0x80,0x40,0x40],#"<",28*/
    [0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x00,0x00],#"=",29*/
    [0x00,0x00,0x40,0x40,0x20,0x80,0x11,0x00,0x0A,0x00,0x04,0x00],#">",30*/
    [0x18,0x00,0x20,0x00,0x23,0x40,0x24,0x00,0x18,0x00,0x00,0x00],#"?",31*/
    [0x1F,0x80,0x20,0x40,0x27,0x40,0x29,0x40,0x1F,0x40,0x00,0x00],#"@",32*/
    [0x00,0x40,0x07,0xC0,0x39,0x00,0x0F,0x00,0x01,0xC0,0x00,0x40],#"A",33*/
    [0x20,0x40,0x3F,0xC0,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00],#"B",34*/
    [0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x30,0x80,0x00,0x00],#"C",35*/
    [0x20,0x40,0x3F,0xC0,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00],#"D",36*/
    [0x20,0x40,0x3F,0xC0,0x24,0x40,0x2E,0x40,0x30,0xC0,0x00,0x00],#"E",37*/
    [0x20,0x40,0x3F,0xC0,0x24,0x40,0x2E,0x00,0x30,0x00,0x00,0x00],#"F",38*/
    [0x0F,0x00,0x10,0x80,0x20,0x40,0x22,0x40,0x33,0x80,0x02,0x00],#"G",39*/
    [0x20,0x40,0x3F,0xC0,0x04,0x00,0x04,0x00,0x3F,0xC0,0x20,0x40],#"H",40*/
    [0x20,0x40,0x20,0x40,0x3F,0xC0,0x20,0x40,0x20,0x40,0x00,0x00],#"I",41*/
    [0x00,0x60,0x20,0x20,0x20,0x20,0x3F,0xC0,0x20,0x00,0x20,0x00],#"J",42*/
    [0x20,0x40,0x3F,0xC0,0x24,0x40,0x0B,0x00,0x30,0xC0,0x20,0x40],#"K",43*/
    [0x20,0x40,0x3F,0xC0,0x20,0x40,0x00,0x40,0x00,0x40,0x00,0xC0],#"L",44*/
    [0x3F,0xC0,0x3C,0x00,0x03,0xC0,0x3C,0x00,0x3F,0xC0,0x00,0x00],#"M",45*/
    [0x20,0x40,0x3F,0xC0,0x0C,0x40,0x23,0x00,0x3F,0xC0,0x20,0x00],#"N",46*/
    [0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00],#"O",47*/
    [0x20,0x40,0x3F,0xC0,0x24,0x40,0x24,0x00,0x18,0x00,0x00,0x00],#"P",48*/
    [0x1F,0x80,0x21,0x40,0x21,0x40,0x20,0xE0,0x1F,0xA0,0x00,0x00],#"Q",49*/
    [0x20,0x40,0x3F,0xC0,0x24,0x40,0x26,0x00,0x19,0xC0,0x00,0x40],#"R",50*/
    [0x18,0xC0,0x24,0x40,0x24,0x40,0x22,0x40,0x31,0x80,0x00,0x00],#"S",51*/
    [0x30,0x00,0x20,0x40,0x3F,0xC0,0x20,0x40,0x30,0x00,0x00,0x00],#"T",52*/
    [0x20,0x00,0x3F,0x80,0x00,0x40,0x00,0x40,0x3F,0x80,0x20,0x00],#"U",53*/
    [0x20,0x00,0x3E,0x00,0x01,0xC0,0x07,0x00,0x38,0x00,0x20,0x00],#"V",54*/
    [0x38,0x00,0x07,0xC0,0x3C,0x00,0x07,0xC0,0x38,0x00,0x00,0x00],#"W",55*/
    [0x20,0x40,0x39,0xC0,0x06,0x00,0x39,0xC0,0x20,0x40,0x00,0x00],#"X",56*/
    [0x20,0x00,0x38,0x40,0x07,0xC0,0x38,0x40,0x20,0x00,0x00,0x00],#"Y",57*/
    [0x30,0x40,0x21,0xC0,0x26,0x40,0x38,0x40,0x20,0xC0,0x00,0x00],#"Z",58*/
    [0x00,0x00,0x00,0x00,0x7F,0xE0,0x40,0x20,0x40,0x20,0x00,0x00],#"[",59*/
    [0x00,0x00,0x70,0x00,0x0C,0x00,0x03,0x80,0x00,0x40,0x00,0x00],#"\",60*/
    [0x00,0x00,0x40,0x20,0x40,0x20,0x7F,0xE0,0x00,0x00,0x00,0x00],#"]",61*/
    [0x00,0x00,0x20,0x00,0x40,0x00,0x20,0x00,0x00,0x00,0x00,0x00],#"^",62*/
    [0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10],#"_",63*/
    [0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#"`",64*/
    [0x00,0x00,0x02,0x80,0x05,0x40,0x05,0x40,0x03,0xC0,0x00,0x40],#"a",65*/
    [0x20,0x00,0x3F,0xC0,0x04,0x40,0x04,0x40,0x03,0x80,0x00,0x00],#"b",66*/
    [0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x40,0x06,0x40,0x00,0x00],#"c",67*/
    [0x00,0x00,0x03,0x80,0x04,0x40,0x24,0x40,0x3F,0xC0,0x00,0x40],#"d",68*/
    [0x00,0x00,0x03,0x80,0x05,0x40,0x05,0x40,0x03,0x40,0x00,0x00],#"e",69*/
    [0x00,0x00,0x04,0x40,0x1F,0xC0,0x24,0x40,0x24,0x40,0x20,0x00],#"f",70*/
    [0x00,0x00,0x02,0xE0,0x05,0x50,0x05,0x50,0x06,0x50,0x04,0x20],#"g",71*/
    [0x20,0x40,0x3F,0xC0,0x04,0x40,0x04,0x00,0x03,0xC0,0x00,0x40],#"h",72*/
    [0x00,0x00,0x04,0x40,0x27,0xC0,0x00,0x40,0x00,0x00,0x00,0x00],#"i",73*/
    [0x00,0x10,0x00,0x10,0x04,0x10,0x27,0xE0,0x00,0x00,0x00,0x00],#"j",74*/
    [0x20,0x40,0x3F,0xC0,0x01,0x40,0x07,0x00,0x04,0xC0,0x04,0x40],#"k",75*/
    [0x20,0x40,0x20,0x40,0x3F,0xC0,0x00,0x40,0x00,0x40,0x00,0x00],#"l",76*/
    [0x07,0xC0,0x04,0x00,0x07,0xC0,0x04,0x00,0x03,0xC0,0x00,0x00],#"m",77*/
    [0x04,0x40,0x07,0xC0,0x04,0x40,0x04,0x00,0x03,0xC0,0x00,0x40],#"n",78*/
    [0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x40,0x03,0x80,0x00,0x00],#"o",79*/
    [0x04,0x10,0x07,0xF0,0x04,0x50,0x04,0x40,0x03,0x80,0x00,0x00],#"p",80*/
    [0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x50,0x07,0xF0,0x00,0x10],#"q",81*/
    [0x04,0x40,0x07,0xC0,0x02,0x40,0x04,0x00,0x04,0x00,0x00,0x00],#"r",82*/
    [0x00,0x00,0x06,0x40,0x05,0x40,0x05,0x40,0x04,0xC0,0x00,0x00],#"s",83*/
    [0x00,0x00,0x04,0x00,0x1F,0x80,0x04,0x40,0x00,0x40,0x00,0x00],#"t",84*/
    [0x04,0x00,0x07,0x80,0x00,0x40,0x04,0x40,0x07,0xC0,0x00,0x40],#"u",85*/
    [0x04,0x00,0x07,0x00,0x04,0xC0,0x01,0x80,0x06,0x00,0x04,0x00],#"v",86*/
    [0x06,0x00,0x01,0xC0,0x07,0x00,0x01,0xC0,0x06,0x00,0x00,0x00],#"w",87*/
    [0x04,0x40,0x06,0xC0,0x01,0x00,0x06,0xC0,0x04,0x40,0x00,0x00],#"x",88*/
    [0x04,0x10,0x07,0x10,0x04,0xE0,0x01,0x80,0x06,0x00,0x04,0x00],#"y",89*/
    [0x00,0x00,0x04,0x40,0x05,0xC0,0x06,0x40,0x04,0x40,0x00,0x00],#"z",90*/
    [0x00,0x00,0x00,0x00,0x04,0x00,0x7B,0xE0,0x40,0x20,0x00,0x00],#"{",91*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xF0,0x00,0x00,0x00,0x00],#"|",92*/
    [0x00,0x00,0x40,0x20,0x7B,0xE0,0x04,0x00,0x00,0x00,0x00,0x00],#"]",93*/
    [0x40,0x00,0x80,0x00,0x40,0x00,0x20,0x00,0x20,0x00,0x40,0x00],#"~",94*/
]

Font1608 = [      
    [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#" ",0*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xCC,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00],#"!",1*/
    [0x00,0x00,0x08,0x00,0x30,0x00,0x60,0x00,0x08,0x00,0x30,0x00,0x60,0x00,0x00,0x00],#""",2*/
    [0x02,0x20,0x03,0xFC,0x1E,0x20,0x02,0x20,0x03,0xFC,0x1E,0x20,0x02,0x20,0x00,0x00],#"#",3*/
    [0x00,0x00,0x0E,0x18,0x11,0x04,0x3F,0xFF,0x10,0x84,0x0C,0x78,0x00,0x00,0x00,0x00],#"$",4*/
    [0x0F,0x00,0x10,0x84,0x0F,0x38,0x00,0xC0,0x07,0x78,0x18,0x84,0x00,0x78,0x00,0x00],#"%",5*/
    [0x00,0x78,0x0F,0x84,0x10,0xC4,0x11,0x24,0x0E,0x98,0x00,0xE4,0x00,0x84,0x00,0x08],#"&",6*/
    [0x08,0x00,0x68,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#"'",7*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xE0,0x18,0x18,0x20,0x04,0x40,0x02,0x00,0x00],#"(",8*/
    [0x00,0x00,0x40,0x02,0x20,0x04,0x18,0x18,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00],#")",9*/
    [0x02,0x40,0x02,0x40,0x01,0x80,0x0F,0xF0,0x01,0x80,0x02,0x40,0x02,0x40,0x00,0x00],#"*",10*/
    [0x00,0x80,0x00,0x80,0x00,0x80,0x0F,0xF8,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x00],#"+",11*/
    [0x00,0x01,0x00,0x0D,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#",",12*/
    [0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80],#"-",13*/
    [0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#".",14*/
    [0x00,0x00,0x00,0x06,0x00,0x18,0x00,0x60,0x01,0x80,0x06,0x00,0x18,0x00,0x20,0x00],#"/",15*/
    [0x00,0x00,0x07,0xF0,0x08,0x08,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00],#"0",16*/
    [0x00,0x00,0x08,0x04,0x08,0x04,0x1F,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00],#"1",17*/
    [0x00,0x00,0x0E,0x0C,0x10,0x14,0x10,0x24,0x10,0x44,0x11,0x84,0x0E,0x0C,0x00,0x00],#"2",18*/
    [0x00,0x00,0x0C,0x18,0x10,0x04,0x11,0x04,0x11,0x04,0x12,0x88,0x0C,0x70,0x00,0x00],#"3",19*/
    [0x00,0x00,0x00,0xE0,0x03,0x20,0x04,0x24,0x08,0x24,0x1F,0xFC,0x00,0x24,0x00,0x00],#"4",20*/
    [0x00,0x00,0x1F,0x98,0x10,0x84,0x11,0x04,0x11,0x04,0x10,0x88,0x10,0x70,0x00,0x00],#"5",21*/
    [0x00,0x00,0x07,0xF0,0x08,0x88,0x11,0x04,0x11,0x04,0x18,0x88,0x00,0x70,0x00,0x00],#"6",22*/
    [0x00,0x00,0x1C,0x00,0x10,0x00,0x10,0xFC,0x13,0x00,0x1C,0x00,0x10,0x00,0x00,0x00],#"7",23*/
    [0x00,0x00,0x0E,0x38,0x11,0x44,0x10,0x84,0x10,0x84,0x11,0x44,0x0E,0x38,0x00,0x00],#"8",24*/
    [0x00,0x00,0x07,0x00,0x08,0x8C,0x10,0x44,0x10,0x44,0x08,0x88,0x07,0xF0,0x00,0x00],#"9",25*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,0x00],#":",26*/
    [0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#";",27*/
    [0x00,0x00,0x00,0x80,0x01,0x40,0x02,0x20,0x04,0x10,0x08,0x08,0x10,0x04,0x00,0x00],#"<",28*/
    [0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x00,0x00],#"=",29*/
    [0x00,0x00,0x10,0x04,0x08,0x08,0x04,0x10,0x02,0x20,0x01,0x40,0x00,0x80,0x00,0x00],#">",30*/
    [0x00,0x00,0x0E,0x00,0x12,0x00,0x10,0x0C,0x10,0x6C,0x10,0x80,0x0F,0x00,0x00,0x00],#"?",31*/
    [0x03,0xE0,0x0C,0x18,0x13,0xE4,0x14,0x24,0x17,0xC4,0x08,0x28,0x07,0xD0,0x00,0x00],#"@",32*/
    [0x00,0x04,0x00,0x3C,0x03,0xC4,0x1C,0x40,0x07,0x40,0x00,0xE4,0x00,0x1C,0x00,0x04],#"A",33*/
    [0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x04,0x11,0x04,0x0E,0x88,0x00,0x70,0x00,0x00],#"B",34*/
    [0x03,0xE0,0x0C,0x18,0x10,0x04,0x10,0x04,0x10,0x04,0x10,0x08,0x1C,0x10,0x00,0x00],#"C",35*/
    [0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00],#"D",36*/
    [0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x04,0x17,0xC4,0x10,0x04,0x08,0x18,0x00,0x00],#"E",37*/
    [0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x00,0x17,0xC0,0x10,0x00,0x08,0x00,0x00,0x00],#"F",38*/
    [0x03,0xE0,0x0C,0x18,0x10,0x04,0x10,0x04,0x10,0x44,0x1C,0x78,0x00,0x40,0x00,0x00],#"G",39*/
    [0x10,0x04,0x1F,0xFC,0x10,0x84,0x00,0x80,0x00,0x80,0x10,0x84,0x1F,0xFC,0x10,0x04],#"H",40*/
    [0x00,0x00,0x10,0x04,0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x04,0x00,0x00,0x00,0x00],#"I",41*/
    [0x00,0x03,0x00,0x01,0x10,0x01,0x10,0x01,0x1F,0xFE,0x10,0x00,0x10,0x00,0x00,0x00],#"J",42*/
    [0x10,0x04,0x1F,0xFC,0x11,0x04,0x03,0x80,0x14,0x64,0x18,0x1C,0x10,0x04,0x00,0x00],#"K",43*/
    [0x10,0x04,0x1F,0xFC,0x10,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x0C,0x00,0x00],#"L",44*/
    [0x10,0x04,0x1F,0xFC,0x1F,0x00,0x00,0xFC,0x1F,0x00,0x1F,0xFC,0x10,0x04,0x00,0x00],#"M",45*/
    [0x10,0x04,0x1F,0xFC,0x0C,0x04,0x03,0x00,0x00,0xE0,0x10,0x18,0x1F,0xFC,0x10,0x00],#"N",46*/
    [0x07,0xF0,0x08,0x08,0x10,0x04,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00],#"O",47*/
    [0x10,0x04,0x1F,0xFC,0x10,0x84,0x10,0x80,0x10,0x80,0x10,0x80,0x0F,0x00,0x00,0x00],#"P",48*/
    [0x07,0xF0,0x08,0x18,0x10,0x24,0x10,0x24,0x10,0x1C,0x08,0x0A,0x07,0xF2,0x00,0x00],#"Q",49*/
    [0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x00,0x11,0xC0,0x11,0x30,0x0E,0x0C,0x00,0x04],#"R",50*/
    [0x00,0x00,0x0E,0x1C,0x11,0x04,0x10,0x84,0x10,0x84,0x10,0x44,0x1C,0x38,0x00,0x00],#"S",51*/
    [0x18,0x00,0x10,0x00,0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x00,0x18,0x00,0x00,0x00],#"T",52*/
    [0x10,0x00,0x1F,0xF8,0x10,0x04,0x00,0x04,0x00,0x04,0x10,0x04,0x1F,0xF8,0x10,0x00],#"U",53*/
    [0x10,0x00,0x1E,0x00,0x11,0xE0,0x00,0x1C,0x00,0x70,0x13,0x80,0x1C,0x00,0x10,0x00],#"V",54*/
    [0x1F,0xC0,0x10,0x3C,0x00,0xE0,0x1F,0x00,0x00,0xE0,0x10,0x3C,0x1F,0xC0,0x00,0x00],#"W",55*/
    [0x10,0x04,0x18,0x0C,0x16,0x34,0x01,0xC0,0x01,0xC0,0x16,0x34,0x18,0x0C,0x10,0x04],#"X",56*/
    [0x10,0x00,0x1C,0x00,0x13,0x04,0x00,0xFC,0x13,0x04,0x1C,0x00,0x10,0x00,0x00,0x00],#"Y",57*/
    [0x08,0x04,0x10,0x1C,0x10,0x64,0x10,0x84,0x13,0x04,0x1C,0x04,0x10,0x18,0x00,0x00],#"Z",58*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFE,0x40,0x02,0x40,0x02,0x40,0x02,0x00,0x00],#"[",59*/
    [0x00,0x00,0x30,0x00,0x0C,0x00,0x03,0x80,0x00,0x60,0x00,0x1C,0x00,0x03,0x00,0x00],#"\",60*/
    [0x00,0x00,0x40,0x02,0x40,0x02,0x40,0x02,0x7F,0xFE,0x00,0x00,0x00,0x00,0x00,0x00],#"]",61*/
    [0x00,0x00,0x00,0x00,0x20,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x00,0x00],#"^",62*/
    [0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01],#"_",63*/
    [0x00,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#"`",64*/
    [0x00,0x00,0x00,0x98,0x01,0x24,0x01,0x44,0x01,0x44,0x01,0x44,0x00,0xFC,0x00,0x04],#"a",65*/
    [0x10,0x00,0x1F,0xFC,0x00,0x88,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x70,0x00,0x00],#"b",66*/
    [0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x00],#"c",67*/
    [0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x11,0x08,0x1F,0xFC,0x00,0x04],#"d",68*/
    [0x00,0x00,0x00,0xF8,0x01,0x44,0x01,0x44,0x01,0x44,0x01,0x44,0x00,0xC8,0x00,0x00],#"e",69*/
    [0x00,0x00,0x01,0x04,0x01,0x04,0x0F,0xFC,0x11,0x04,0x11,0x04,0x11,0x00,0x18,0x00],#"f",70*/
    [0x00,0x00,0x00,0xD6,0x01,0x29,0x01,0x29,0x01,0x29,0x01,0xC9,0x01,0x06,0x00,0x00],#"g",71*/
    [0x10,0x04,0x1F,0xFC,0x00,0x84,0x01,0x00,0x01,0x00,0x01,0x04,0x00,0xFC,0x00,0x04],#"h",72*/
    [0x00,0x00,0x01,0x04,0x19,0x04,0x19,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00],#"i",73*/
    [0x00,0x00,0x00,0x03,0x00,0x01,0x01,0x01,0x19,0x01,0x19,0xFE,0x00,0x00,0x00,0x00],#"j",74*/
    [0x10,0x04,0x1F,0xFC,0x00,0x24,0x00,0x40,0x01,0xB4,0x01,0x0C,0x01,0x04,0x00,0x00],#"k",75*/
    [0x00,0x00,0x10,0x04,0x10,0x04,0x1F,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00],#"l",76*/
    [0x01,0x04,0x01,0xFC,0x01,0x04,0x01,0x00,0x01,0xFC,0x01,0x04,0x01,0x00,0x00,0xFC],#"m",77*/
    [0x01,0x04,0x01,0xFC,0x00,0x84,0x01,0x00,0x01,0x00,0x01,0x04,0x00,0xFC,0x00,0x04],#"n",78*/
    [0x00,0x00,0x00,0xF8,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x00,0xF8,0x00,0x00],#"o",79*/
    [0x01,0x01,0x01,0xFF,0x00,0x85,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x70,0x00,0x00],#"p",80*/
    [0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x01,0x05,0x01,0xFF,0x00,0x01],#"q",81*/
    [0x01,0x04,0x01,0x04,0x01,0xFC,0x00,0x84,0x01,0x04,0x01,0x00,0x01,0x80,0x00,0x00],#"r",82*/
    [0x00,0x00,0x00,0xCC,0x01,0x24,0x01,0x24,0x01,0x24,0x01,0x24,0x01,0x98,0x00,0x00],#"s",83*/
    [0x00,0x00,0x01,0x00,0x01,0x00,0x07,0xF8,0x01,0x04,0x01,0x04,0x00,0x00,0x00,0x00],#"t",84*/
    [0x01,0x00,0x01,0xF8,0x00,0x04,0x00,0x04,0x00,0x04,0x01,0x08,0x01,0xFC,0x00,0x04],#"u",85*/
    [0x01,0x00,0x01,0x80,0x01,0x70,0x00,0x0C,0x00,0x10,0x01,0x60,0x01,0x80,0x01,0x00],#"v",86*/
    [0x01,0xF0,0x01,0x0C,0x00,0x30,0x01,0xC0,0x00,0x30,0x01,0x0C,0x01,0xF0,0x01,0x00],#"w",87*/
    [0x00,0x00,0x01,0x04,0x01,0x8C,0x00,0x74,0x01,0x70,0x01,0x8C,0x01,0x04,0x00,0x00],#"x",88*/
    [0x01,0x01,0x01,0x81,0x01,0x71,0x00,0x0E,0x00,0x18,0x01,0x60,0x01,0x80,0x01,0x00],#"y",89*/
    [0x00,0x00,0x01,0x84,0x01,0x0C,0x01,0x34,0x01,0x44,0x01,0x84,0x01,0x0C,0x00,0x00],#"z",90*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x3E,0xFC,0x40,0x02,0x40,0x02],#"{",91*/
    [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00],#"|",92*/
    [0x00,0x00,0x40,0x02,0x40,0x02,0x3E,0xFC,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00],#"]",93*/
    [0x00,0x00,0x60,0x00,0x80,0x00,0x80,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x20,0x00],#"~",94*/
]

progress_head = [
    0x00,0x00,0x00,0x00,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,
    0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,
]
progress_zero = [
    0x00,0x00,0x00,0x00,0x3F,0xFC,0x3F,0xFC,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,
    0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,
    ]
progress_start = [
    0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,
    0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,
    ]
progress_Spare = [
    0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,
    0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC
    ]
progress_full = [
    0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,
    0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x3F,0xFC,0x3F,0xFC,0x00,0x00,0x00,0x00,
    ]
progress_end = [
    0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,
    0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x00,0x00,0x00,0x00,
]
Rpi zero w running 2016-03-18-raspbian-jessie
Rpi 3 b running Openplotter
osx 10.12.5
Risposta
#25
(21/09/2017, 02:30)Mauro Calanca Ha scritto:
Citazione: (non credo cambi molto, anzi forse è più semplice).
ahahahahahihihihihihihhihahahahahahahah

io sto diventando pazzo

allora credo di avere installato la librerie che il display mi chiede e cioè:

  • bcm2835 libraries

  • seguendo questa pagina:
  • http://www.airspayce.com/mikem/bcm2835/

    pi@raspberrypi:~/Desktop/librerieRASP/bcm2835-1.52 $ ./configure
  • e poi


    pi@raspberrypi:~/Desktop/librerieRASP/bcm2835-1.52 $ make
  • e poi


    pi@raspberrypi:~/Desktop/librerieRASP/bcm2835-1.52 $ sudo make check
  • e poi ancora

    pi@raspberrypi:~/Desktop/librerieRASP/bcm2835-1.52 $ sudo make install
  • wiringPi libraries

  • seguendo questa pagina:
  • https://projects.drogon.net/raspberry-pi...d-install/

    pi@raspberrypi:~ $ git clone git://git.drogon.net/wiringPi
  • poi do

    pi@raspberrypi:~/wiringPi $ git pull originAlready up-to-date.pi@raspberrypi:~/wiringPi $ ./build
  • e poi

    pi@raspberrypi:~/wiringPi $ gpio -v
  • e lui mi da

    gpio version: 2.44Copyright © 2012-2017 Gordon HendersonThis is free software with ABSOLUTELY NO WARRANTY.For details type: gpio -warrantyRaspberry Pi Details:  Type: Pi Zero-W, Revision: 01, Memory: 512MB, Maker: Sony   * Device tree is enabled.  *--> Raspberry Pi Zero W Rev 1.1  * This Raspberry Pi supports user-level GPIO access.
  • e io continuo
Codice:
pi@raspberrypi:~/wiringPi $ gpio readall

  • e lui mi da

    +-----+-----+---------+------+---+-Pi ZeroW-+---+------+---------+-----+-----+ | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM | +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     | |   2 |   8 |   SDA.1 |   IN | 1 |  3 || 4  |   |      | 5v      |     |     | |   3 |   9 |   SCL.1 |   IN | 1 |  5 || 6  |   |      | 0v      |     |     | |   4 |   7 | GPIO. 7 |   IN | 1 |  7 || 8  | 0 | IN   | TxD     | 15  | 14  | |     |     |      0v |      |   |  9 || 10 | 1 | IN   | RxD     | 16  | 15  | |  17 |   0 | GPIO. 0 |   IN | 0 | 11 || 12 | 0 | IN   | GPIO. 1 | 1   | 18  | |  27 |   2 | GPIO. 2 |   IN | 0 | 13 || 14 |   |      | 0v      |     |     | |  22 |   3 | GPIO. 3 |   IN | 0 | 15 || 16 | 0 | IN   | GPIO. 4 | 4   | 23  | |     |     |    3.3v |      |   | 17 || 18 | 1 | IN   | GPIO. 5 | 5   | 24  | |  10 |  12 |    MOSI |   IN | 0 | 19 || 20 |   |      | 0v      |     |     | |   9 |  13 |    MISO |   IN | 0 | 21 || 22 | 0 | IN   | GPIO. 6 | 6   | 25  | |  11 |  14 |    SCLK |   IN | 0 | 23 || 24 | 1 | IN   | CE0     | 10  | 8   | |     |     |      0v |      |   | 25 || 26 | 1 | IN   | CE1     | 11  | 7   | |   0 |  30 |   SDA.0 |   IN | 1 | 27 || 28 | 1 | IN   | SCL.0   | 31  | 1   | |   5 |  21 | GPIO.21 |   IN | 1 | 29 || 30 |   |      | 0v      |     |     | |   6 |  22 | GPIO.22 |   IN | 1 | 31 || 32 | 0 | IN   | GPIO.26 | 26  | 12  | |  13 |  23 | GPIO.23 |   IN | 0 | 33 || 34 |   |      | 0v      |     |     | |  19 |  24 | GPIO.24 |   IN | 0 | 35 || 36 | 0 | IN   | GPIO.27 | 27  | 16  | |  26 |  25 | GPIO.25 |   IN | 0 | 37 || 38 | 0 | IN   | GPIO.28 | 28  | 20  | |     |     |      0v |      |   | 39 || 40 | 0 | IN   | GPIO.29 | 29  | 21  | +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM | +-----+-----+---------+------+---+-Pi ZeroW-+---+------+---------+-----+-----+
  • a questo punto io credo che anche questa sia installata

ora tocca a quella di python (Python Libraries for Raspbian (contain RPi.GPIO and spidev installation packages)
http://www.waveshare.com/wiki/Pioneer600...on_for_RPi

Codice:
sudo apt-get install python-dev
poi
Codice:
pi@raspberrypi:~ $ cd RPi.GPIO-0.6.3/
Codice:
pi@raspberrypi:~/RPi.GPIO-0.6.3 $ sudo python setup.py install
Codice:
pi@raspberrypi:~/RPi.GPIO-0.6.3 $ sudo apt-get install python-smbus
Codice:
pi@raspberrypi:~/RPi.GPIO-0.6.3 $ sudo apt-get install python-serial
Codice:
pi@raspberrypi:~/RPi.GPIO-0.6.3 $ sudo python setup.py install
Codice:
pi@raspberrypi:~/RPi.GPIO-0.6.3 $ sudo apt-get install python-imaging

a questo punto mi vado a cercare gli esempi scaricati da qui: 
http://www.waveshare.com/wiki/File:2.13i...AT-code.7z
che scompatto ed entrando nelle rispettive cartelle per raspberry provo finalmente a eseguire gli script, come dice qui: http://www.waveshare.com/wiki/2.13inch_e...s_required 
Codice:
BCM2835: Execute the command: make, to compile the code and generate a file epd. Execute the command: sudo ./epd, the program will run.
WringPi: Execute the command: make, to compile the code and generate a file epd. Execute the command: sudo ./epd, the program will run.
Python: Execute the command: sudo python main.py

ma...
Codice:
pi@raspberrypi:~/Desktop/2.13inch_e-Paper_HAT-code/raspberrypi/bcm2835 $ make
make: 'epd' is up to date.
pi@raspberrypi:~/Desktop/2.13inch_e-Paper_HAT-code/raspberrypi/bcm2835 $ sudo ./epd
sudo: ./epd: command not found
pi@raspberrypi:~/Desktop/2.13inc

 e allora provo con l'altra
Codice:
pi@raspberrypi:~/Desktop/2.13inch_e-Paper_HAT-code/raspberrypi $ cd wiringpi/
pi@raspberrypi:~/Desktop/2.13inch_e-Paper_HAT-code/raspberrypi/wiringpi $ make
make: 'epd' is up to date.
pi@raspberrypi:~/Desktop/2.13inch_e-Paper_HAT-code/raspberrypi/wiringpi $ sudo ./epd
sudo: ./epd: command not found

non desisto e provo l'ultima
Codice:
pi@raspberrypi:~/Desktop/2.13inch_e-Paper_HAT-code/raspberrypi/python $ sudo python main.py
Traceback (most recent call last):
 File "main.py", line 27, in <module>
   import epd2in13
 File "/home/pi/Desktop/2.13inch_e-Paper_HAT-code/raspberrypi/python/epd2in13.py", line 27, in <module>
   import epdif
 File "/home/pi/Desktop/2.13inch_e-Paper_HAT-code/raspberrypi/python/epdif.py", line 38, in <module>
   SPI = spidev.SpiDev(0, 0)
IOError: [Errno 2] No such file or directory

ora è un po tardi e io non capisco

buongiorno a voi e buonanotte a me

EUREKA

e pur si muove

caricando gli esempi per lo schermo da 1.54 inch, funge

logicamente non si aggiorna tutto ma piu della metà   Big Grin

adesso viene il bello...


Ciao, ho tra le mani anche io il display 2.13 ma non vuol proprio funzionare... sono fermo a ./epd not found e non riesco ad andare avanti... Qualcuno ha novità in merito?

Ok ce l'ho fatta scompattando l'esempio della versione 2 e nella sottocartella wiringpi...
----------------------
Minhas raizes estao no ar, minha casa è qualquer lugar... Vieni a trovarmi qui!
----------------------
Risposta
  


Vai al forum:


Navigazione: 1 Ospite(i)
Forum con nuovi Post
Forum senza nuovi post
Forum bloccato
Forum Redirect