Difference between revisions of "Electronics Vending Machine"

From Makers Local 256
Jump to: navigation, search
(Made my first page!)
 
m (Xinput: added some links)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Project|Creator=Traza
 
{{Project|Creator=Traza
|Status=<onlyinclude> Your Status </onlyinclude>                                <!--LEAVE ONLYINCLUDES FOR STATUS HACK-->  
+
|Status=<onlyinclude> In-progress </onlyinclude>                                <!--LEAVE ONLYINCLUDES FOR STATUS HACK-->  
 
|Born On=18:34, 25 April 2016 (CDT)                                                                  <!--DO NOT EDIT -->
 
|Born On=18:34, 25 April 2016 (CDT)                                                                  <!--DO NOT EDIT -->
 
|Last Updated={{#time: H:i, d F Y| {{REVISIONTIMESTAMP}} }} (CDT)              <!--DO NOT EDIT -->
 
|Last Updated={{#time: H:i, d F Y| {{REVISIONTIMESTAMP}} }} (CDT)              <!--DO NOT EDIT -->
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>
 +
 +
Links:
 +
 +
[https://wiki.ubuntu.com/X/InputCoordinateTransformation https://wiki.ubuntu.com/X/InputCoordinateTransformation]
 +
 +
[https://www.raspberrypi.org/forums/viewtopic.php?f=108&t=122032 https://www.raspberrypi.org/forums/viewtopic.php?f=108&t=122032]
  
  
 
[[Category:Vending Machines]]                                                  <!--MAKE AS MANY CATEGORIES AS YOU NEED-->
 
[[Category:Vending Machines]]                                                  <!--MAKE AS MANY CATEGORIES AS YOU NEED-->

Latest revision as of 19:06, 25 April 2016

Creator:
Traza
Status:
In-progress
Born On:
18:34, 25 April 2016 (CDT)
Last Updated:
19:06, 25 April 2016 (CDT)

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

Links:

https://wiki.ubuntu.com/X/InputCoordinateTransformation

https://www.raspberrypi.org/forums/viewtopic.php?f=108&t=122032