-4

Please look at my project architecture below.

enter image description here

I intend to use Arduino as Web server and pull data into the SQL database of my PC. I have installed XAMPP, so I have the apache server and MySQL running in my PC. I have verified that data from Arduino is updating a table in the SQL DB.

Question:

I'm not a web-developer and I have been exploring different ways of pulling data from the SQL DB and showing it on web-page.

My requirements:

  1. Pull live data from the SQL DB (as it gets updated) and show it on web page
  2. Plot graphs of recorded parameters from the db as and when required. I understand that Flot is a tool which can do that.
  3. Make a drawing as shown in the image above and populate that with dynamic values (numbers) or change colors of objects (such as green/red)

Methods I have come across so far

  1. Use PHP to pull the data and show on webpage. Use HTML/Javascript/jQuery to create such drawing and populate with image and values

  2. Use Python to pull data and use HTML/Javascript/jQuery (I know only HTML among these)

  3. Use Visual Basic to pull data directly from Arduino and display it in a form. For this option, I'm not sure if plotting data is possible or not.

This of-course is a broad question and as I said I'm not a web developer. But I'm in no hurry. I have couple of months of time to invest and learn the different languages involved.

I wish the answers could guide me to a better solution than I know or chose one among the others or just point out plus-and-minus of each of the options

Prasanna
  • 303
  • 2
  • 16
  • 1
    I think option 1 and 2 a very similar and option 3 is different. The question is: Do you want to keep a record of your data? In other words do you use the database to store data in chronological order for later retrieval? In that case option 1 and 2 would be the best, given what you already have. Either would do. – KIKO Software Jan 15 '18 at 14:57
  • @KIKOSoftware, yes I want to keep a record of the data and want to use it for later plots. – Prasanna Jan 15 '18 at 15:04

1 Answers1

1

You can use EventSource at JavaScript to stream data from PHP or Python the the HTML document.

guest271314
  • 1
  • 15
  • 104
  • 177
  • Can you recommend a learning path for this? I already know a bit of `HTML`. I'm completely into `w3schools.com`. I take `EventSource` is a method in JavaScript – Prasanna Jan 15 '18 at 15:10
  • See https://html.spec.whatwg.org/multipage/server-sent-events.html, https://stackoverflow.com/questions/42512572/how-to-send-xmlhttprequest-continuously-in-webworker/ – guest271314 Jan 16 '18 at 02:59