A/B button placement seems a bit low

Modules, cases, buttons...

Re: A/B button placement seems a bit low

Postby ripper121 » Tue Apr 15, 2014 10:44 am

For rotating i think you have only to change the axis in the code.
User avatar
ripper121
 
Posts: 224
Joined: Fri Apr 04, 2014 2:02 pm
Location: Germany

Re: A/B button placement seems a bit low

Postby 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.
User avatar
hrangan
 
Posts: 58
Joined: Thu Mar 20, 2014 9:35 pm
Location: Bangalore, India

Re: A/B button placement seems a bit low

Postby 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
User avatar
ripper121
 
Posts: 224
Joined: Fri Apr 04, 2014 2:02 pm
Location: Germany

Re: A/B button placement seems a bit low

Postby 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.
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: A/B button placement seems a bit low

Postby hrangan » Tue Apr 15, 2014 11:14 am

Awesome. Your libraries are awe inspiring rodot. So much goodness in them ;)
User avatar
hrangan
 
Posts: 58
Joined: Thu Mar 20, 2014 9:35 pm
Location: Bangalore, India

Re: A/B button placement seems a bit low

Postby rodot » Tue Apr 15, 2014 11:36 am

Hahaha thanks, I do my best :)
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Previous

Return to Hardware Development

Who is online

Users browsing this forum: No registered users and 29 guests

cron