Chiu
un elaboratore tascabile
Hardware
Cpu
- Orange Pi Zero Plus2 (schematic)
altre board
- SAMA5D2x CPU a basso consumo, possibilita di low power mode, uscita per TFT
- AR9331
- Music802
- Carambola2
Display
- Risoluzione: 320x240 ILI9341 (40x30)
- Risoluzione: 480x320 ILI9486
- Bus: SPI
- https://marcosgildavid.blogspot.com/2014/02/getting-ili9341-spi-screen-working-on.html
- https://github.com/juj/fbcp-ili9341
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 |
CHX
Scheda che implementa: caricabatteria, stepup, tastiera, led
uC supervisore
- STM32L041F6 20 pin, 15 gpio, 32mhz, 32 KB Flash, 1 KB EEPROM, 8 KB RAM
- 8 - 16 tasti (4x4)
- 2 - i2c
- 1 - vbatt
- 1 - pwr
- 1 - sensore movimento
- 2 - leds
- LDO [LD2985 https://www.st.com/en/power-management/ld2985.html]
carica batteria
- CN3065
- STC4054 800ma, TSOT23-5L, in 4.25V - 6.5V
- MCP73811
- MCP73831/2
step-up
Software
Seriale (via usb gadget)
una volta flashato e acceso, il device esporra' una seriale via usb gadget, ES:
/dev/ttyACM0
per collegarsi:
screen /dev/ttyACM0 115200 8n1
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
cambiare font e dimensione del display
source: https://learn.watterott.com/hats/rpi-display/faq/
eseguire con permessi di super-user:
dpkg-reconfigure console-setup
quindi seguire i passaggi:
- Encoding to use on the console: <UTF-8>
- Character set to support: <Guess optimal character set>
- Font for the console: Terminus (default is VGA)
- Font size: 6x12 (framebuffer only)
e riavviare
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 dal boot
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 (vedi "trovare il proprio device..")
tinydrm
https://github.com/torvalds/linux/tree/master/drivers/gpu/drm/tiny
aptitude install linux-headers-next-sunxi
in myili9341.dts:
/dts-v1/; /plugin/; / { compatible = "allwinner,sun8i-h3"; fragment@0 { target-path = "/aliases"; __overlay__ { spi1 = "/soc/spi@01c69000"; }; }; fragment@1 { target = <&spi1>; __overlay__ { status = "okay"; spidev { compatible = "spidev"; reg = <0>; spi-max-frequency = <50000000>; }; }; }; fragment@2 { target = <&spi1>; __overlay__ { #address-cells = <1>; #size-cells = <0>; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&bb_spi1_pins>; display@0{ status = "okay"; compatible = "ilitek,ili9341"; reg = <0>; spi-max-frequency = <32000000>; dc-gpios = <&gpio 12 0>; // lcd dc reset-gpios = <&gpio 11 0>; // lcd reset // backlight = <&backlight_gpio>; // lcd lite // backlight = <&backlight_pwm>; // lcd lite // rotation = <180>; }; }; }; };
armbian-add-overlay myili9431.dts
GUI
Applicazioni
- alpine
- mutt
- aerc
Feed
Chat
- profanity supporta temi
Risparmio energetico
Idle
ARISC on board
- https://linux-sunxi.org/AR100
- https://forum.armbian.com/topic/6019-openrisc-core-ar100-for-the-real-time-tasks/
- https://github.com/skristiansson/ar100-info