Web App tells Arduino to Get Data from MySQL, then Use It in a Program on Arduin

Hello all,

I can't seem to fix the gap in my understanding here despite the seemingly relevant discussion elsewhere.

I'd like to create a web application that, once told to, grabs data from a MySQL database, assigns it as variables, then uses those variables to power/colour a series of Arduinos with LEDs.

I'm not asking how to code it, I'm more asking what languages/technologies should I learn about?

e.g.

What languages are used to make a suitable web app?
How does the Web App talk to the arduino? What languages / protocols?
How can i display what the arduinos doing on the Web App?

Broadly put, what's involved?

Thank you anyone who has the time to comment!
Mikey Musch.

IF

The Arduino is USB connected to a PC with the database or access to it

THEN

It would be faster, cheaper and far easier to have a PC program take instruction from the Arduino and return the needed data.

ELSE IF

You have to make it harder (through the moar principle)

THEN

It will be harder.

You can step up the moar through wireless from bluetooth to GSM.
Or go ethernet cable.

As you add layers of boards/shields/devices and libraries you will need bigger Arduinos like the Mega2560 and the Due. At some point it might make more sense to move to a Pi or other board.

Decisions, decisions.

I'd like to create a web application that

This involves a client (running the application) and a server (serving up the application). Which role, if either, will the Arduino play?

once told to, grabs data from a MySQL database

Running where? Why would you be storing RGB values in a database?

then uses those variables to power/colour a series of Arduinos with LEDs.

A series of Arduinos? You can't power an Arduino or an LED from a variable. You power the Arduino and LED(s) with a power supply. You control the color of the LED with data, not a variable.

miklossmusch:
Hello all,

I can't seem to fix the gap in my understanding here despite the seemingly relevant discussion elsewhere.

I'd like to create a web application that, once told to, grabs data from a MySQL database, assigns it as variables, then uses those variables to power/colour a series of Arduinos with LEDs.

I'm not asking how to code it, I'm more asking what languages/technologies should I learn about?

e.g.

What languages are used to make a suitable web app?
How does the Web App talk to the arduino? What languages / protocols?
How can i display what the arduinos doing on the Web App?

Broadly put, what's involved?

Thank you anyone who has the time to comment!
Mikey Musch.

Well, I did something similar in a project. I used Arduino, Processing (JAVA) as a bridge to write/read into / from a MySQL DB, and PHP to set commands.
I use that for a home automation.

If you´re patient enough you can wait till i´ve posted everything on my blog.

Hi all,

Sorry, to be more specific, this is my issue:

1 - There is a wall of LEDs scattered across a horizontal distance of ~40m, and 4m high.
2 - clients wish to light up these LEDs in their own way (interactive artwork)
3 - clients can use a form online to view the LED wall, and select which LEDs they want on and what colour
4 - clients can go to the wall IRL, use a nearby pc/tablet to log in to their account, find their saved form data (or custom LED configuration) and load it up.

So I need:
the online form (could also be part of webapp) to save its data to a database online (maybe as an array)
the web app, to select the data, assign it to variables. (array[0] = LED1, array[5] = LED6 etc etc)
then those variables to be assigned to the LEDs

What sort of technologies can achieve this? assuming I already have a series of Arduinos and LEDs

Thanks again!

What sort of technologies can achieve this?

Why save the data to a database? Saving to a file makes more sense to me.

A web app assumes more than one person is going to use it. I can't imagine putting the app on the internet, and letting anyone that wants to diddle with the wall of lights.

I would a C# forms app that saved data to a flat file, and/or sent it to the Arduino(s).

PaulS:
Why save the data to a database? Saving to a file makes more sense to me.

Many people will use this web app.
I don't intend on putting the web app on the internet.
I would just keep it on a local pc as stated here:
"4 - clients can go to the wall IRL, use a nearby pc/tablet to log in to their account, find their saved form data (or custom LED configuration) and load it up."

The reason i need to connect to a database is because the form will be online. meaning anyone can create their own configuration wherever they are and have it saved in a database. but if they want to load it onto the wall they need to come to the installation.

date=1417219050]
Hi all,

Sorry, to be more specific, this is my issue:

1 - There is a wall of LEDs scattered across a horizontal distance of ~40m, and 4m high.
2 - clients wish to light up these LEDs in their own way (interactive artwork)
3 - clients can use a form online to view the LED wall, and select which LEDs they want on and what colour
4 - clients can go to the wall IRL, use a nearby pc/tablet to log in to their account, find their saved form data (or custom LED configuration) and load it up.

So I need:
the online form (could also be part of webapp) to save its data to a database online (maybe as an array)
the web app, to select the data, assign it to variables. (array[0] = LED1, array[5] = LED6 etc etc)
then those variables to be assigned to the LEDs

What sort of technologies can achieve this? assuming I already have a series of Arduinos and LEDs

Thanks again!

HOW many LEDs will be on this shiny wall? 3000?
If you have a really big amount of LEDs you will need to plan a network of arduinos followed by considerations about the protocol you will use to controll them all!

You can use PHP and MySQL for the GUI and for datastorage. In the DB you will need to uniquely adress every arduino and every single attached LED with its brightness, and R,G,B values.

If you are done with that, you have to write a "bridge software" from MySQL to Serial communication.
Or mybe you want to yous the PHP Serial Library.

Give us some more info about how many LED are planned, which technology you prefer (only RGB LEDs or NEOPIXELs), etc...

It could be possible (depending on the amount of LEDs).

I hope you haven´t planned to finish this project before X-Mas :stuck_out_tongue:

have you already seen that?