Difference between revisions of "Electronics Vending Machine"
m (Changed status) |
(OK TRAVIS) |
||
Line 6: | Line 6: | ||
==Overview== | ==Overview== | ||
+ | |||
This is a work in progress that will supply the wonderful makers with a source of electronics and tidbits to help with their projects. | This is a work in progress that will supply the wonderful makers with a source of electronics and tidbits to help with their projects. | ||
===Hardware=== | ===Hardware=== | ||
+ | |||
* 25 slot "cigarette" vending machine | * 25 slot "cigarette" vending machine | ||
* Raspberry Pi | * Raspberry Pi | ||
Line 15: | Line 17: | ||
===Software=== | ===Software=== | ||
+ | |||
+ | ==== Xinput ==== | ||
+ | |||
+ | In the raspberry pi config.txt file, you can set lcd_rotate and display_rotate. | ||
+ | |||
+ | lcd_rotate can only flip the screen. But will also flip the touchscreen input. | ||
+ | |||
+ | display_rotate can rotate at 90 degree intervals, but doesn't not affect the touchscreen. | ||
+ | |||
+ | So... We want to rotate the pi's screen 270 degrees. Thus, display_rotate has to be used. But now how to we get the touchscreen input to match? | ||
+ | |||
+ | <pre> | ||
+ | xinput list-prop 6 | ||
+ | </pre> | ||
+ | List the available properties of the pointer with the above command. Replace '6' with the appropriate device. | ||
+ | |||
+ | To adjust the input (rotated and then inverted) apply the following transformation matrix: | ||
+ | <pre> | ||
+ | xinput set-prop 6 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1 | ||
+ | </pre> | ||
+ | |||
+ | |||
[[Category:Vending Machines]] <!--MAKE AS MANY CATEGORIES AS YOU NEED--> | [[Category:Vending Machines]] <!--MAKE AS MANY CATEGORIES AS YOU NEED--> |
Revision as of 19:03, 25 April 2016
Creator: |
Contents
[hide]Overview
This is a work in progress that will supply the wonderful makers with a source of electronics and tidbits to help with their projects.
Hardware
- 25 slot "cigarette" vending machine
- Raspberry Pi
- Touchscreen Interface
- PC power supply
Software
Xinput
In the raspberry pi config.txt file, you can set lcd_rotate and display_rotate.
lcd_rotate can only flip the screen. But will also flip the touchscreen input.
display_rotate can rotate at 90 degree intervals, but doesn't not affect the touchscreen.
So... We want to rotate the pi's screen 270 degrees. Thus, display_rotate has to be used. But now how to we get the touchscreen input to match?
xinput list-prop 6
List the available properties of the pointer with the above command. Replace '6' with the appropriate device.
To adjust the input (rotated and then inverted) apply the following transformation matrix:
xinput set-prop 6 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1