Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issues loading sketches to Mega and DUE
#1
Hi all,

I've dropped Rob an email as well I was having issues getting signed in on the forum, but I've fixed that now and I'm not posting as guest anymore (yay!). With Rob away sunning himself I thought now I have access to you lot, someone may have already had this issue and resolved it and Rob won't have to come back and worry about what I've done to mess this up lol.

Right the issue is............ I've got both eeprom defaults to upload to my mega and my DUE with no issues, every thing compiles and then uploads, the DUE says CPU reset and the mega says upload successful.

The issue is with the main code.

I get this message with the DUE

Arduino: 1.6.0 (Windows 8), Board: "Arduino Due (Programming Port)"

DISPLAY_RoboTank_V1_6.ino:20:20: fatal error: UTFT.h: No such file or directory

compilation terminated.

Error compiling.

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


The mega gives this

Arduino: 1.6.0 (Windows 8), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Build options changed, rebuilding all

POWER_BAR_RoboTank_V1_6.ino:23:38: fatal error: Adafruit_PWMServoDriver.h: No such file or directory
compilation terminated.
Error compiling.

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


Now I've checked and double checked the folders and libraries, all the files are there in the right places and I've tried putting everything in the arduino folder in my documents after getting this from the desktop folder I'm using (I have used arduino before and I have separate folders on my desktop for the programs so I don't get confused when I modify one and uploaded sketches, I've done this with no issues before).
Like I said the eeprom defaults work, it's throwing errors about a single missing .h file?

Any ideas?
Reply to top
#2
sounds like arduino IDE is using libraries from some where else don't have separate folders when you open the IDE and sketchbook do you see both powerbar and display? and only one library with all your folders all in one place.

might be easier to fix this if you just uninstall arduino and reinstall to C:\arduino that way every thing is in that folder then change the sketch directory to that copy over the need libraries then upload every thing again clear the Eeprom n the mega fist first and if the DUE gives problems about can not find it just click the red reset button and click upload again.

hopefully this will take care of all your problems and it is real easy to do and takes like 5 minutes :) finger crossed for some good luck
Reply to top
#3
Thanks for the reply rott.

Yes I've tried using the arduino folder that's created when the IDE is installed and as I said everything looks to be in the correct folders regardless of the folder the IDE is looking at.
One thing I came across last night while hacking about on google, arduino.cc has several topics in their forum with similar issues, one thing suggested was the IDE doesn't have the library installed for some reason and I have to go to sketch on the menu bar and install libraries, open up the zip file for that library to load it into the IDE.
I haven't had a chance today to give this a crack so it might be the fix, I'll update when I've tried it.
Reply to top
#4
Well that was a pain in the ass, just had to add each library to the IDE one at a time.
Upside, the display sketch compiles now. I'll see if I can get it on the board tomorrow, then I need to find me an SD card for the images, got to be one lying around here somewhere lol.
Reply to top
#5
Well I've got the sketches on the boards (yay), got some screen issues. I have nothing but coloured static and no response from touch.
At one point after hitting the reset button on the DUE I got a red background with the date of 29th april in the top, some graph boxes and no touch response.
It hasn't done that since I started messing with a second screen. Both screens just show the static.
Reply to top
#6
did you pick the right screen from the sketch and uncomment it then upload it?
Reply to top
#7
Did you use the corresponding calibration UTouchCD file to match your screen? Also, on the display sketch did you make sure the correct line is enabled for your screen as well as comment out the others? I think it's around line 47 of the display sketch.

// Uncomment the display you have, be sure the others are commented out using // at the beginning
//UTFT myGLCD(TFT01_70, 25, 26, 27, 28); // used for ElecFreaks and Sainsmart 7" Display
//UTFT myGLCD(TFT01_50, 25, 26, 27, 28); // used for ElecFreaks and Sainsmart 5" Display
UTFT myGLCD (CPLD, 25, 26, 27, 28); //For 5" and 7“ CPLD Displays
Reply to top
#8
Yep, I'm using a sainsmart screen so there's every chance it's got a problem.
I'm about to look for the code for a 3.2 screen I have lying around and I'll see if anything happens with that. It's also sainsmart so I'm not holding my breath lol.
I'll try and get an electricfreaks one.
Reply to top
#9
Hey Benny314, sorry it hasn't been going smooth, the sainsmart screens are usually difficult to get working, they are different then the rest and lots do seem to have problems. The libraries in the package should work for it though at least it seems to most of the time. In the code at line 47 as Rott pointed out make sure you remove the "//" at the beginning of line 48 and add "//" to the beginning of line 50. In the calibration folder copy the file "UTcouhCD" from the SainSmart 7 inch folder and copy it to "Documents/Arduino/libraries/UTouch" folder on your computer and overwrite the existing one. It appears some of the sainsmart displays use different calibration numbers so the touch may not work properly but the display should look correct. Also try the example file in the "C:\Users\******\Documents\Arduino\libraries\UTFT\examples\Arduino (AVR)\UTFT_Demo_800x480" to see if works. I'll send you a couple different libraries to try via email shortly. Make sure all the IDE's are closed when changing libraries otherwise it doesn't see the new ones. If you can find a library for your 3.2" it should fire up however you'll only see part of the screen.
Reply to top
#10
Cheers Rob I'll give that a crack.

Hope your holiday was good.
Reply to top


Possibly Related Threads…
Thread Author Replies Views Last Post
  Screen issues. Benny314 29 30,409 02-26-2016, 11:21 AM
Last Post: Rob F
  What is the correct way to Upload sketches sassod 9 9,336 12-04-2015, 12:21 AM
Last Post: Rob F

Forum Jump:

Current time: 04-26-2024, 11:34 PM