Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is most likely no translated for the post!





sketch too big erro...
 
Share:
Notifications
Clear all

sketch too big error attempting to verify/compile project  

Page 2 / 5
  RSS

tvr4
 tvr4
(@tvr4)
Trusted Member
Joined: 2 months ago
Posts: 73
June 21, 2020 5:56 PM  

I found a similar board that has a display builtin.  Not sure how it compares to the previous one.

I appreciate your feedback since you seem to know more about this alternative board than anyone else

https://www.makerfocus.com/products/makerfocus-esp32-oled-wifi-kit-esp-32-0-96-inch-oled-display-wifi-bluetooth-cp2102-internet-development-board-for-arduino-esp8266-nodemcu?_pos=13&_sid=9cc9455af&_ss=r


ReplyQuote
Hans
 Hans
(@hans)
Noble Member Admin
Joined: 7 years ago
Posts: 1443
June 22, 2020 4:42 AM  

Cool - I had seen that one on Amazon as well, too bad it doesn't come with an SD card reader as well ...
I see it has Bluetooth though - nice! (but probably useless for your project)

I did see they have some very nice screens and GPS modules (in case you're interested).

Interestingly though, I could not find any SD card readers on their page. 

Note: AliExpress also has quite a bit of fun stuff to play with and they are (usually) very cheap. 😊 


ReplyQuote
tvr4
 tvr4
(@tvr4)
Trusted Member
Joined: 2 months ago
Posts: 73
June 22, 2020 10:28 AM  

Rats, I didn't notice that it didn't have an SD card support.

For this project I really want to make a small GPS data logger for my RC cars.  There are only a few commercial products and none are that good.  So I decided to make my own.

It wanted to start with the Arduino Uno and the project we were discussing.   The board is larger so it is easier to work with.
Then I could decide what to do from there.

Here is the GPS data logger I bought a few months ago.  It does not measure acceleration or allow data exporting and graphing
https://www.skyrc.com/gpsgsm015

They have another model that measures different data but still does not allow for data to be exported
https://www.skyrc.com/gsm020

I was thinking of taking the project and porting it to a Nano.  This would be smaller and easier to fit in my small RC cars.
What do you think?  Doable?


ReplyQuote
Hans
 Hans
(@hans)
Noble Member Admin
Joined: 7 years ago
Posts: 1443
June 22, 2020 4:06 PM  

I was already afraid you wouldn't like the fact that the SD card option wasn't included 😉 

Maybe a silly suggestion, but why not use an old smartphone (that has GPS)?
For Android and iOS there (used to be?) plenty of GPS trackers (or GPS logger, not 100% sure about the name anymore).

Alternatively, I used for the longest time a tiny and very cheap GPS logger device for my trips (about the size of a BIC lighter, which included an internal rechargeable battery) - so I knew where I had been and where I had taken certain pictures (to be synced once I got back home). Naturally these days I no longer use that device (don't even know where I put it), since our phones and most cameras have GPS build in. I looked to see if I could find mine, but unfortunately, I have no clue where I left it.

On that note, since you're talking RC scale, I can imagine that quite a few GPS receivers may not be accurate enough? But I could be very wrong of course, since I have never used it for that purpose.

While trying to find a solution, I did notice that there are quite a few projects for GPS logging, but most do not use a display with it.
Last time I played with a display, I used a display with build-in SD card reader (link).
But as you can see ... it's been a while 😋  (2014)

I haven't worked with GPS modules on the Arduino yet ...


ReplyQuote
Hans
 Hans
(@hans)
Noble Member Admin
Joined: 7 years ago
Posts: 1443
June 22, 2020 4:07 PM  

Maybe these Android apps are useful, if recycling an old Android phone is an option.


ReplyQuote



tvr4
 tvr4
(@tvr4)
Trusted Member
Joined: 2 months ago
Posts: 73
June 22, 2020 5:09 PM  

You have some great ideas.  Actually the display I bought is just like the one you posted, with SD card support.  I just haven't feceived it yet.

As far as an old cell phone, I do not have a spare.  But even if I did, it would be way to big to fit in an RC car


ReplyQuote
Hans
 Hans
(@hans)
Noble Member Admin
Joined: 7 years ago
Posts: 1443
June 23, 2020 5:14 AM  

Just trying to help you find something that may work (always like a good challenge)  😋 

My last RC car was a toy when I was a kid - I never found the time to explore this more as an adult 😔 
I did have a drone for a while, but those have GPS already build-in - but I do know what you mean with size limitations.

I just wish I could find my GPS Logger, so I could share what model to look for.
It's really tiny and it would always sit in my backpack.

Since I do not have a clue of the amount of data, you could consider using EEPROM functions to store data.
On an ESP8266 this appears to be stored in Flash (link), and can be up to 4096 bytes (is this enough?).
Since the ESP8266 has WiFi, maybe sync the data as soon as there is a WiFi connection (maybe based on pressing a button?).
But now that I think about it, this may be too cumbersome (versus using an SD card).

Another option maybe the use of SPIFFS - which effectively allows you to save "files" in the Flash memory of an ESP8266.
Granted: I have never tried this, so I can't tell you much about it. But like with EEPROM (fake) use, transfering the data to a PC can be a challenge.
In this article they show (from what I understand) how to implement a file-server on your ESP8266. Data is stored on the tiny file system, and once connected to WiFi you can access the "webserver" to retrieve the files.
May be an option to explore as well - but it would not work for an Arduino.


ReplyQuote
tvr4
 tvr4
(@tvr4)
Trusted Member
Joined: 2 months ago
Posts: 73
June 23, 2020 9:43 AM  

Sounds like some good ideas.  But I like the concept of saving to an SD card that way I am not limited by data storage.  It would be nice if I could access the data by bluetooth, or other means, remotely from my phone so that I don't have to pul the SD card.

But the data logger should display max speed and I could use that until I look at the GPS data later.

I haven't ordered the Maxfocus board yet since I am not convinced that I can get it to program or work with my limited arduino knowledge.

The commercial data logger link that I sent you works similar to this.  You can't access the data directly but can view it in their app.. It shows a GPS track and max speed.  But there is no way to access the data directly.

I would also like to measure acceleration.  Can I do this somehow?


ReplyQuote
tvr4
 tvr4
(@tvr4)
Trusted Member
Joined: 2 months ago
Posts: 73
June 23, 2020 11:34 AM  

Since I am waiting for the correct display with SD support, I decide to try the GPS datalogger code. This is the one that does not support SD.

I had some tinkering issues with the wiring.  The display I have is not the one from the project so I had to mess around with the wiring to get it to work.  The display is also the wrong size so some data is not displayed.

Plus the code for the GPS module needed to reverse the GPS pins.

But it works.  Pic attached.

Do you know how to convert the GPS UTC time to actual local time?

Thanks

 


ReplyQuote
Hans
 Hans
(@hans)
Noble Member Admin
Joined: 7 years ago
Posts: 1443
June 25, 2020 4:55 AM  

Look great! 👍 😊 

As for UTC to local time ... I haven't done anything with that on an Arduino yet.

As far as I can see, most GPS libraries provide the data in a structure and you'd need to add o subtract a certain number of hours to get your local time.
I'm sure you already know this. Not to mention potential daylight savings (another disaster).

When adding hours, you'll of course have to watch the 24 hour limit of a day, which could be easy if the date doesn't matter.

Assuming you have to add hours to the UTC time:
Just increase hours + offset, if the sum > 24, then subtract 24.
If the date is important, then "if sum>24", then day has to increase by one.
Now this is where it gets tricky if the date is needed: you'll have to figure out when the month or year has to increase as well.

The opposite for when you are subtracting hours of course.

Personally I'd exploring using timestamps.

One method uses one day represented by "1". So "1" = 24 hours.
In such a case, changing time is easier (make sure the used variables are all "float"); you can just add or subtract the number of hours as fractions of 24.
So +6 hours = + 6/24 = + 1/4.
You'd have to convert it back to the time structure of course to be able to "read" the result.

It may also be represented as the number of seconds since 0:00 January 1st, 1970 (Unix Timestamp).
Here again increasing/decreasing is simple: just add (subtract) the number of hours expressed in seconds.
here you'd also need to convert it back to the time structure.

I'm not sure if one or the other time library supports this.
Maybe you'll can code in one of the RTC (real time clock) libraries?


ReplyQuote



tvr4
 tvr4
(@tvr4)
Trusted Member
Joined: 2 months ago
Posts: 73
June 25, 2020 9:08 AM  

@hans

Sounds really complicated.  For the data file I could probably use the UTC time.  But for the display I need to show realistic local time.

 


ReplyQuote
Hans
 Hans
(@hans)
Noble Member Admin
Joined: 7 years ago
Posts: 1443
June 26, 2020 4:30 AM  

Yeah, it may sound a little overwhelming indeed.

I'm pretty sure the unic (or: epoch) time is the easiest to work with. You just add (or substract) the number of hours (3600 per hour) in seconds of the long integer number.

So read the UTC time from your GPS module, convert it to epoch/unix time, add/subtract the hours, convert to date/time structure so you can display it.

In search I found a few comments referring to PRJC Time library and Adafruit RTC Lib.
I also did see that you're not alone with this question, see StackExchange.

So it should be very doable once you found the right library with the functions needed.


ReplyQuote
Hans
 Hans
(@hans)
Noble Member Admin
Joined: 7 years ago
Posts: 1443
June 26, 2020 4:32 AM  

p.s. this may be helpful code as well.


ReplyQuote
tvr4
 tvr4
(@tvr4)
Trusted Member
Joined: 2 months ago
Posts: 73
June 26, 2020 6:11 PM  

Still sounds like a lot of work.  I am back to square one with the data logger. 

The display I bought was defective so I had to order another from a different seller.
So I have to wait, again


ReplyQuote
Hans
 Hans
(@hans)
Noble Member Admin
Joined: 7 years ago
Posts: 1443
June 27, 2020 5:10 AM  

I'm sorry to hear that - nothing worse than waiting for nothing 😕 

I think I found something easy that applies to what you're doing, it even uses TinyGPS: https://www.pjrc.com/teensy/td_libs_Time.html#gps

From what I am reading, not extra external hardware is needed (so no realtime clock needed).
It literally considers timezone. You can find the library here (it also shows instructions how to get it through the library manager: Using the Arduino Library Manager, install "Time by Michael Margolis".)

// Offset hours from gps time (UTC)
//const int offset = 1;   // Central European Time
//const int offset = -5;  // Eastern Standard Time (USA)
//const int offset = -4;  // Eastern Daylight Time (USA)
//const int offset = -8;  // Pacific Standard Time (USA)
const int offset = -7;  // Pacific Daylight Time (USA)

Unfortunately, I do not have a GPS module laying around, otherwise I'd give it try (kinda like I'm on a mission haha).


ReplyQuote



Page 2 / 5
Share: