Arduino Forum

Products => Arduino Esplora => Topic started by: kor1989 on Sep 17, 2013, 04:59 pm

Title: Arduino Snake released
Post by: kor1989 on Sep 17, 2013, 04:59 pm
Hy,
I've developed a little version of snake for Arduino Esplora with TFT screen.
This is the link for my blog with the code
http://whatelectronicisfor.blogspot.it/2013/09/snake-for-arduino-esplora.html (http://whatelectronicisfor.blogspot.it/2013/09/snake-for-arduino-esplora.html)
Update the link is changed and now it is in English

I hope this will help to develop other games

Happy sketching
Title: Re: Arduino Snake released
Post by: einzig on Nov 14, 2013, 07:40 am
Thanks for sharing, been having a lot of fun with it
Title: Re: Arduino Snake released
Post by: Legoman39 on Jan 19, 2015, 03:27 am
OMG THIS IS AWESOME!!!!!!!!!!!!!!!!!!!!!!!!!!! 8)  8)  8)  8)  8)  :smiley-wink:  :smiley-wink:  :smiley-wink:  :)  :)  :)  :smiley-lol:  :smiley-lol:  :smiley-lol:  :o  :o  :smiley-grin:  :smiley-grin:  :smiley-grin:  :smiley-grin:  :smiley-grin:  :smiley-grin:  :smiley-grin:  :smiley-wink:
Title: Re: Arduino Snake released
Post by: rachbath on Nov 08, 2017, 02:59 am
Hi Kor1989,

I have copied your code and put it into my software. I am getting the following error message:

Arduino: 1.8.1 (Windows 10), Board: "Arduino/Genuino Uno"

In file included from C:\Program Files (x86)\Arduino\libraries\TFT\src/TFT.h:36:0,

                 from D:\UserFolders\rba\Documents\Arduino\My stuff\Snake_test\Snake_test.ino:17:

C:\Program Files (x86)\Arduino\libraries\TFT\src/utility/Adafruit_GFX.h:60:3: warning: #warning "The SD library was not found. loadImage() and image() won't be supported." [-Wcpp]

  #warning "The SD library was not found. loadImage() and image() won't be supported."

   ^

Snake_test:22: error: 'EsploraTFT' was not declared in this scope

 int xScreen = EsploraTFT.width()/scale;

               ^

Snake_test:23: error: 'EsploraTFT' was not declared in this scope

 int yScreen = EsploraTFT.height()/scale;

               ^

D:\UserFolders\rba\Documents\Arduino\My stuff\Snake_test\Snake_test.ino: In function 'void setup()':

Snake_test:39: error: 'EsploraTFT' was not declared in this scope

   EsploraTFT.begin();

   ^

D:\UserFolders\rba\Documents\Arduino\My stuff\Snake_test\Snake_test.ino: In function 'void loop()':

Snake_test:121: error: 'EsploraTFT' was not declared in this scope

         EsploraTFT.background(0, 100, 150);

         ^

Snake_test:141: error: 'EsploraTFT' was not declared in this scope

     EsploraTFT.stroke(0, 0, 0);

     ^

D:\UserFolders\rba\Documents\Arduino\My stuff\Snake_test\Snake_test.ino: In function 'void updatePositions()':

Snake_test:295: error: 'EsploraTFT' was not declared in this scope

   EsploraTFT.fill(0, 0, 0); // the same color of the background

   ^

D:\UserFolders\rba\Documents\Arduino\My stuff\Snake_test\Snake_test.ino: In function 'void drawSnakeHead()':

Snake_test:308: error: 'EsploraTFT' was not declared in this scope

   EsploraTFT.fill(255, 225, 225);

   ^

D:\UserFolders\rba\Documents\Arduino\My stuff\Snake_test\Snake_test.ino: In function 'void placeBeacon()':

Snake_test:344: error: 'EsploraTFT' was not declared in this scope

   EsploraTFT.fill(0, 255, 0);

   ^

exit status 1
'EsploraTFT' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


If you could help me with this as I am a beginner in coding and I would like to get this working.

Thanks in advance for your help
Rach