📜 ⬆️ ⬇️

Orange Pi on car wash part 3

Continuing articles Arduino on a car wash and Arduino on a car wash Part 2 .


As is clear from the title, they switched to using the Orange Pi One. The machine is much more interesting Arduino. Selected among their own kind mainly because of the price. Compared to the Arduino better solves the following problems:

- network (no problems yet)
- connect the monitor instead of the scoreboard
- the possibility of using the touch panel
- the possibility of using the database
- the ability to install on the "self" web server

DietPi is selected as an operating system. Programming in QT. Bill acceptor connected via serial port. Monitor to HDMI. Touch panel in USB. Outputs to relays 29, 31, 33, 35, 37. A 22-foot tap receiver is connected through a voltage divider.
')
Also implemented is the mode of receiving money through the cashier with the issuance of a PIN code to the client. The server for storing the pin code status can be one of oranges. Issuance and control of a pin code via a web page for example from a smartphone. Thus, you can save money on bill acceptors.

Some life khaki oranges:

Stop the console on the UART for the note

sudo systemctl stop serial-getty@ttyS0.service sudo systemctl mask serial-getty@ttyS0.service 

Screen rotation (/etc/X11/xorg.conf file)

 Section "Device" Identifier "default" Driver "fbdev" Option "Rotate" "CW" EndSection 

We include support for some touch panels (/ etc / modules file)

 hid_multitouch 

Do not sleep (file /etc/X11/xorg.conf.d/10-dpms.conf)

 Section "ServerFlags" Option "blank time" "0" Option "standby time" "0" Option "suspend time" "0" Option "off time" "0" EndSection 

Set the output mode.

 void pinMode(int pin, int mode) { FILE *file; char path[80]; file=fopen("/sys/class/gpio/export" , "w"); fprintf(file, "%d", pin); fclose(file); sprintf(path, "/sys/class/gpio/gpio%d/direction", pin); file=fopen(path , "w"); fprintf(file, "%s", mode ? "out" : "in"); fclose(file); } 

Enable / Disable Relay.

 void digitalWrite(int pin, int value) { FILE *file; char path[40]; sprintf(path, "/sys/class/gpio/gpio%d/value", pin); file=fopen(path , "w"); fputc(value?'1':'0', file); fclose(file); } 

Brief conclusions at the moment:

- Orange is still stable, no flash memory crashes have been recorded.
- We didn’t achieve steady work from the touch panels, go to the buttons.

Future plans:

- connection of inductive loops to fix the presence of the machine
- the creation of a personal account of the client with the ability to memorize and further use the cash balance on any device network car washes.

Source: https://habr.com/ru/post/330124/


All Articles