Cours:NanoPi : Différence entre versions
(→NanoHat Oled) |
(→NanoHat Oled) |
||
Ligne 77 : | Ligne 77 : | ||
Il est donc nécessaire d'ajouter la palette [https://flows.nodered.org/node/node-red-contrib-python-function node-red-contrib-python-function] : | Il est donc nécessaire d'ajouter la palette [https://flows.nodered.org/node/node-red-contrib-python-function node-red-contrib-python-function] : | ||
− | + | ||
+ | - Suivre la même procédure que dans la section NodeRed. | ||
=Utilisation= | =Utilisation= |
Version du 11 mars 2020 à 16:54
- https://www.armbian.com/nanopi-neo-2/
- https://projetsdiy.fr/installer-node-red-orange-pi-armbian/
- https://nodered.org/docs/getting-started/raspberrypi
- https://tech.scargill.net/the-friendlyarm-nanopi-neo/
- http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO2
- http://wiki.friendlyarm.com/wiki/index.php/WiringNP:_NanoPi_NEO/NEO2/Air_GPIO_Programming_with_C
- https://www.balena.io/etcher/ : créer une carte sd à partir d'une image
- http://wiki.friendlyarm.com/wiki/index.php/NanoHat_OLED : référence NanoHat OLED
Sommaire
Installation
image et installation minimum
- http://download.friendlyarm.com/nanopineo2
- balena etcher pour créer carte sd
- change mdp root : geii
apt update / apt dist-upgrade
apt install build-essential apt-utils
apt install mosquitto-clients
apt install aptitude htop
apt remove modemmanager
cross QT
As usual !
- get Sysroot
- get qtSource
- compilation
- upload
script à venir ... peut-être !
NodeRed
- installation nodered
apt update
apt install curl
bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)
//ne pas installer Pi nodes
npm install node-red-contrib-opi-gpio
- install node-red-contrib-opi-gpio
- depuis nodeRed
- manage Palette
- install
- node-red-contrib-opi-gpio
NanoHat Oled
Shield avec écran et trois boutons poussoir.
Documentation : http://wiki.friendlyarm.com/wiki/index.php/NanoHat_OLED
- Installation du code support :
git clone https://github.com/friendlyarm/NanoHatOLED.git
cd NanoHatOLED/BakeBit/Script
./install.sh
Des exemples de code C et Python d'utilisation de l'écran sont consultable dans les dossiers
NanoHatOLED/BakeBit/Software/C
NanoHatOLED/BakeBit/Software/Python
- Appel depuis NodeRed
Le plus simple est d'utiliser la bibliothèque Python.
Il est donc nécessaire d'ajouter la palette node-red-contrib-python-function :
- Suivre la même procédure que dans la section NodeRed.
Utilisation
Qt
- Configurer QtCreator
nodeRed
- tableau correspondance gpio <=> broche : gpio readall
- choisir "Pi Type" : "NanoPi Neo"
- choisir la broche dans le menu déroulant