kinda, but it contains 3 files right? how can i call the TinyGPS library, if im going to put it in an interrupt? lets say if i pushed a button, it will call the tinygps after 5 seconds?
Iāve said it before, and Iāll say it again: please, for your own good, read some guids, watch some tutorials, get informed about general arduino coding. The stuff youāre trying to do isnāt so hard, yet youāve asked the same question in about five different topics. Itās becoming to look like you just want us to write the code for you. Thatās not even a bad thing, but just say so. Some of your (repeated) questions seem to indicate that you simply havenāt read certain things (like the docs, or answers given), as well as a lack of some basic coding capabilities.
Well, on to your question thenā¦
Split it up into parts. Are you able to call the library without the interrupt/button? So you only do the library stuff. Then, try to get your button/interrupt working without the GPS library. Once thatās done, you should be able to merge them.
@krvarma how can i set the marker to display the deviceID of the spark core? why because im planning to stretch the possibility of having multiple cores published on the web.
when the marker is pressed it will display the deviceID of the spark core.
@paolosofio01, you can use the MarkerWithLabel
to add a marker with label, in your case Device ID. But displaying Device ID is not recommended in production environment since it will reveal the identity of the Spark Core. I recommend you to display the Core name instead of Code ID.
You can use marker.setMap
to display and google.maps.event.addListener
to add click listener.
thanks! btw, can i place the spark_location.html inside a wordpress site?
@paolosofio01, you can, but the users have access to your Spark Core credentials. Anybody who View Source can access your credentials. All these HMTL samples are demonstration purpose only. In production environment you should not expose your Core credentials. Instead you an use some server side code like Node.js to listen for the events and perform tasks.
how can i place the code in wordpress to parse the NMEA sentences? the site has a login page that has only one user. thanks!
@paolosofio01, could you please explain you needs, you want to include this in a Wordpress blog? or display as a page in Wordpress blog?
i want the spark_location.html to be placed in a page in wordpress site because i want to these things:
ā when the marker pops out, it will display the spark device name which will then be searched on the right panel for extra details on the owner who triggered the button.
ā have a register page for it to be directly registering the spark on the website
@paolosofio01, I donāt completely understand your requirements. You want to create a Wordpress Page and display Map icons, when you click on it it will popup a window and display Core information, is that correct? Also you need the ability to register core (using coreid and accesstoken) which you will store it in a database and use this information to listen for location update events, is it?
In that case you need to write some server side codes to store and retrieve Spark Core information and display the Map icons. I donāt understand the need of Wordpress in that case.
let me explain it this way, we are developing this project for the administrator side of the school, in that case this website or letās say tracking the location of the core (for the student) is mainly for the use of authorized personel.
-the website has a login page which consists of 3 menus (Home, Locator, Register)
- the locator mainly is the spark_location.html
-the register side is the page that when we want to register a new spark core it will go through that page (name, student no, college, access token, deviceID, etcā¦)
-the locator page has 2 columns,
------the left column is mainly for the google maps
------the right column will serve as the search panel wherein when a marker or a core has
------been activated a infobox will appear containing its deviceID, which will then be
------search in the panel to display current information about that.
as a result, i mainly want to do a website in wordpress to save time, but i dont know how can i incorporate the āparseingā code in the google maps in wordpress.
To sum it all up, youāll need the following things:
- A database in which user information is stored, and to which a Core can be linked.
- A Google maps page/column in which Cores can be seen.
- A column in which said user information is displayed upon Core selection from the maps column.
- A page in which the user data (database) can be edited.
Moreover, should Cores always show on the map, or only when they are selected from a list?
If Iām right with my above summary, then Iām not really sure what Wordpress is good for. Itās a good platform if you want to do some quick/easy blogging, but thatās pretty much where it ends. As soon as you want something as specific as this, youāll end up having to write your own plugins etc. If youāre going to go through all that trouble, you might as well make a website yourself.
I could be mistaken, but I think NodeJS might be a good fit for this. Not only is it seen as the IoT language of the future, but it also plays nicely with the Spark. Itās even capable of hosting a website, so you donāt have to host that somewhere exotic.
Might I ask where your coding capabilities lay? Are you comfortable with a certain programming language? Have you ever programmed web/server applications before?
Yeahp youāre correct @Moors7 , before Iām thinking of HTML and PHP since a website with database is needed. My coding capabilities lies on HTML and PHP around 5 to 6.
By the way @krvarma, there is a thread Iāve read about displaying multiple cores on a webpage, is that applicable to google maps? Like when 3 cores are activated will the spark_location.html capable of listening to 3 or more cores if not what would I do?
function start() {
var deviceID = "55ff6f065075555352511687";
var accessToken = "0947f68987d754080549017f6296dfddeac574b2";
can i connect the var = deviceID to the database for me to have multiple markers? its like when one triggers the device to locate him, the gmaps will look first in the database who is that then pop the marker out with necessary details again coming from the database?
Can I ask again, does the spark_location.html capable of transmitting live location, like its moving āliveā?
@paolosofio01, I am not sure about your question, you can display multiple Spark Core locations. Please refer to the @bkoās tutorial. I posted the link in one of the reply.
Could you please explain your complete requirement, then many community members can help you to solve the problems you are facing.
Few points I want answers to these questions guys please:
1.) Does the Spark Core capable of publishing multiple points with google maps?
2.) Letās say I have managed to work on displaying multiple points in google maps, if somebody activated one core, lets say core1 (displaying a marker on the google maps) how can core1 display its deviceID on the marker
3.) Can I place the DeviceID and the AccessToken on a database for the marker?
4.) @krvarma What i meant for the live location is like moving marker, like live gps feed from the car? Moving marker, live?
5.) Iāve managed to work on the blinking part of the LED, but Iām searching over the net on how to press-and-hold but I canāt find one. Can someone give me a link how to work on this using millis?
Please guys help me on this? @kennethlimcp @Moors7 @bko @CuriousTech @ScruffR @peekay123 @Dave
Hi @paolosofio01,
Lets say in this example you have a core with a GPS sensor attached, and youāre using a cellular mobile wifi hotspot. In this case you could read the GPS location from the core every few seconds, and use a āSpark.publishā to publish that location to the cloud.
From there you could have a webhook, or an app subscribed to events coming from your core, and updating a marker on a map with that location. Generally in most mapping frameworks, moving the marker means just removing it, and re-adding it to your map. I would try starting with an example that lets you quickly get data from your core onto a website, and then try sending your GPS coordinates, and then pulling those into a map.
I hope that helps!
Thanks,
David
So it means, I canāt work on live āmove per moveā location of the man who activated the core?
Hi @paolosofio01,
In the scenario I described, you would be getting live location updates from your GPS sensor, provided you have an internet connection, and built a page that way.
Thanks,
David