Modules, cases, buttons...
by ripper121 » Tue Apr 15, 2014 10:44 am
For rotating i think you have only to change the axis in the code.
-
ripper121
-
- Posts: 224
- Joined: Fri Apr 04, 2014 2:02 pm
- Location: Germany
by hrangan » Tue Apr 15, 2014 10:49 am
Yes, though I'm not sure if the buttons are also remapped, so that the original left button now moves you right.
-
hrangan
-
- Posts: 58
- Joined: Thu Mar 20, 2014 9:35 pm
- Location: Bangalore, India
-
by ripper121 » Tue Apr 15, 2014 10:53 am
remapping is also simple, you have to change the port number where the button is connected
in this example you only have to change this line: const int buttonPin = 2; <--Arduino Pin 0-13
http://arduino.cc/en/tutorial/button
-
ripper121
-
- Posts: 224
- Joined: Fri Apr 04, 2014 2:02 pm
- Location: Germany
by rodot » Tue Apr 15, 2014 11:11 am
Directional buttons are correctly remapped when you rotate the screen
You just have to change the line
- Code: Select all
#define DISPLAY_ROT NOROT //set to NOROT, ROTCCW, ROT180 or ROTCW
in the file settings.c
It also changes the value of LCDWIDTH and LCDHEIGTH accordingly so you can program your game for it to work either in landscape or portrait mode.
-
rodot
- Site Admin
-
- Posts: 1290
- Joined: Mon Nov 19, 2012 11:54 pm
- Location: France
-
by hrangan » Tue Apr 15, 2014 11:14 am
Awesome. Your libraries are awe inspiring rodot. So much goodness in them
-
hrangan
-
- Posts: 58
- Joined: Thu Mar 20, 2014 9:35 pm
- Location: Bangalore, India
-
by rodot » Tue Apr 15, 2014 11:36 am
Hahaha thanks, I do my best
-
rodot
- Site Admin
-
- Posts: 1290
- Joined: Mon Nov 19, 2012 11:54 pm
- Location: France
-
Return to Hardware Development
Who is online
Users browsing this forum: No registered users and 5 guests