|
Post by Valkir on Jun 25, 2014 7:49:56 GMT -8
Hi all
I'm currently working for a hospital and I'm trying to code the gameduino 2 to control a device I had create in the research lab.
Can you guys help about creating button.
#include <EEPROM.h> #include <SPI.h> #include <GD2.h> #define TAG_BUTTON 200
void setup() { GD.begin(); GD.cmd_loadimage(0, 0); GD.load("backpres.jpg"); GD.Begin(BITMAPS); GD.Vertex2ii(0, 0); GD.swap(); delay (5000); GD.Clear(); GD.cmd_loadimage(0, 0); GD.load("back1.jpg"); GD.Begin(BITMAPS); GD.Vertex2ii(0, 170); GD.swap();
}
void loop() {
}
|
|
|
Post by jamesbowman on Jun 25, 2014 16:45:44 GMT -8
I suggest you take the "widgets" example (under "5.Demos") as a starting point, and strip out the widgets you don't need. It has two buttons, hooked up to tags, they are the the "2D" and "3D" buttons top right: The book covers simple touch tags on p.22 and widgets on p. 64.
|
|
|
Post by marteke on Jul 19, 2014 15:04:13 GMT -8
I suggest you take the "widgets" example (under "5.Demos") as a starting point, and strip out the widgets you don't need. It has two buttons, hooked up to tags, they are the the "2D" and "3D" buttons top right: The book covers simple touch tags on p.22 and widgets on p. 64. hello, I have a Tag problem! in simon game when I touch out of the circle in a specific point it is accepted as a touch in circle, the same problem in game frogger i touch out of the arrows and the frog is moved ! there is one more point per Tag! there is defect in my gameduino 2
|
|
|
Post by jamesbowman on Jul 20, 2014 8:00:00 GMT -8
It sounds like the touch-screen needs to be calibrated. From the FAQ: To force a calibration re-run, load the selftest sketch under 4.Utilities. The first time the Gameduino 2 boots, it calibrates the touchscreen - asking you to “please tap on the dot” in three places on the screen. It then stores this calibration in Arduino EEPROM.
|
|
|
Post by marteke on Jul 21, 2014 8:07:30 GMT -8
It sounds like the touch-screen needs to be calibrated. From the FAQ: To force a calibration re-run, load the selftest sketch under 4.Utilities. The first time the Gameduino 2 boots, it calibrates the touchscreen - asking you to “please tap on the dot” in three places on the screen. It then stores this calibration in Arduino EEPROM. I did many times! do not worked! but I solved that, running the program Viewer. I have another problem; the SD card, evry time when a turn on I can´t read SD card pictures! I run sleftest and SD failure.... I have to try several times until work I have another problem; the SD card, every time when a turn on I can´t read SD card pictures! I run self test and SD failure.... I have to try several times until have success. I changed the SD card twice! I bought a new gameduino 2 just to compare. I use arduino mega2560, which one EEPRON address can I use? I suspect which I have used a EEPRON address improper.
|
|