Chiu

From ciapini
Revision as of 01:52, 8 February 2020 by Panda (talk | contribs)
Jump to navigation Jump to search

un elaboratore tascabile

Hardware

Cpu

OPiPinout.jpg
Orange-Pi-Zero-Pinout.jpg

Display

  • Risoluzione: 320x240 ILI9341 (40x30)
  • Risoluzione: 480x320 ILI9486
  • Bus: SPI
ili9341 OPi Note GPIO
SCK 23 SCLK 14
MOSI 19 15
CS 24 CS0 13
RST 5 11
DC 3 12
LED 18 need check 18
VCC 1 3.3v
GND 6 GND

Tasti

  • Joystick U/D/L/R + Push
  • Sensore di movimento
  • Sensore di luce

uC supervisore

  • 11 input
  • SPI verso schermo
  • I2C verso scheda CPU

carica batteria

  • candidati: CN3065, STC4054, MCP73811, MCP73831/2

step-up

Software

Display

fbtft_device (kernel <5.4)

in /boot/armbianEnv.txt:

overlays=usbhost2 usbhost3 spi-spidev
param_spidev_spi_bus=1

in /etc/modprobe.d/fbtft.conf:

options fbtft_device custom name=fb_ili9341 gpios=dc:12,reset:11,led:18 speed=1600000 fps=5 busnum=1 bgr=1 rotate=90

X

FRAMEBUFFER=/dev/fb0 startx
trovare il proprio device /dev/fbX

verificare che device ci sono sotto /dev/fb*:

root@orangepizeroplus2:~# ll /dev/fb*
crw-rw---- 1 root video     29, 0 Feb  8 01:15 /dev/fb0
crw-rw---- 1 root video     29, 1 Feb  8 01:15 /dev/fb1

quindi lanciare il modprobe:

modprobe fbtft_device custom name=fb_ili9341 gpios=dc:12,reset:11,led:18 speed=1600000 fps=5 busnum=1 bgr=1 rotate=90

e verificare il nuovo device:

root@orangepizeroplus2:~# ll /dev/fb*
crw-rw---- 1 root video     29, 0 Feb  8 01:15 /dev/fb0
crw-rw---- 1 root video     29, 1 Feb  8 01:15 /dev/fb1
-rw-r--r-- 1 root root  101056512 Feb  8 01:50 /dev/fb2

nel nostro caso e' il

/dev/fb2
test del display

una volta che a mano viene lanciato

modprobe fbtft_device custom name=fb_ili9341 gpios=dc:12,reset:11,led:18 speed=1600000 fps=5 busnum=1 bgr=1 rotate=90

il display dovrebbe diventare bianco e poi per righe di pixel, nero. quindi e' possibile lanciare:

cat /dev/urandom > /dev/fb2

che creera' una schermata con pixel di diversi colori (random)

console output su lcd

source: https://kaspars.net/blog/spi-display-orange-pi-zero

in /etc/modules-load.d/fbtft.conf:

fbtft_device

in /etc/modprobe.d/fbtft.conf:

options fbtft_device custom name=fb_ili9341 gpios=dc:12,reset:11,led:18 speed=1600000 fps=5 busnum=1 bgr=1 rotate=90

in /boot/armbianEnv.txt add:

extraargs="fbcon=map:2"

dove "2" e' il tuo /dev/fbX

tinydrm

https://github.com/torvalds/linux/tree/master/drivers/gpu/drm/tiny

GUI

Applicazioni

Risparmio energetico

Idle

ARISC on board

Sleep