I am an arduino beginner and I am trying to make a speed camera alert system, it would start beeping if I am above the speed limit and getting close to the speed camera. There is this website where I can get all the data I need, coordinates, direction and speed limit of every 36000 speed cams in my country.
I would need some extra memory space to be able to store all this data, would an eeprom chip do the job? and would it be able to keep up with a for loop going through all those 36000 speed cam locations to check if i am close to it and above the speed limit?
Edit: since going through all those locations on a loop would be a lot for the processor to handle, someone recommended the creation of a temp file that would narrow that list down by direction, and when that direction changed it would recalculate that temp file. This is what I came up with:
void setup() {
int tempDirection = gpsDirection;
writeTempFile();
}
void loop() {
//this will recalculate the temp file when the gpsDirection changes
if(gpsDirection > tempDirection +5 || gpsDirection < tempDirection -5){
tempDirection = gpsDirection;
writeTempFile();
}
for(temp file){
if(distance <= 100 && speed > speedlimit){
//start beeping
}
}
}
void writeTempFile(){
//this will write a temp file with every cam with a direction that's similar the gps direction
for(each line of the file){
if(gpsDirection + 10 > camDirection || gpsDirection - 10 < camDirection ){
add cam to temp file;
}
}
}