Geo fencing and information

Hi MIT guys and girls,
I am trying to develop an app, with a map and Geo fence circles of about 2km radius that you can add on certain locations. The idea is if you enter this radius the app will send a value to an Arduino esp 32 connected via my cell phone on bluetooth. I have successfully connected the Arduino and get the location and a value to the Firebase server. I also have a map and location sensor, but this is where im stuck... How do i get to add location tags and when i get within a radius it will send a two digit numeric value to my Arduino?
Any help will be very appreciated. ps i love this app inventor make programming very easy and enjoyable...
I need a way of map,location sensor, adding geo circles on map and sending info as I approach and get inside these geo circles?

Could this help?

1 Like

Welcome Waldo.

Several methods showing how you might use different types of geofence are described here>
Location sensor (ringed fence / circular ringed fence) - #2 by SteveJG another method using javascript is described here> Geofence. Check if a point is inside a polygon. JavaScript. Map - #3 by Juan_Antonio

Also, How do I program MyLocation to alert when in proximity of required location? - #5 by SteveJG might be interesting.

How you accomplish this part depends on how you coded the part of the app that sets up your locations. You haven't showed how you did that? Post your Block code please.

One method could be something similar to National Park Tutorial (Markers) updated . It has lots of 'locations' saved and can determine the closest to the user.

The arduino part can be achieved by
if .. then statements and a Clock to constantly poll the user location to use Bluetooth to send the two digit value to your Arduino.

You want a Tag for your Firebase for each Location. Use the FirebaseDB tool to create as many as you need.

There isn't a tutorial showing how to merge all these requirements.

1 Like