Home › Forums › Mayfly Data Logger › Connecting to the Internet
- This topic has 23 replies, 5 voices, and was last updated 2019-01-25 at 1:13 AM by Shannon Hicks.
-
AuthorPosts
-
-
2018-03-16 at 12:21 AM #12198Hello
I am trying to use two mayfly dataloggers to collect data and port it to a sql database. I am an infant when it comes to anything related to electronics and programming. I have managed to get
HelloI am trying to use two mayfly dataloggers to collect data and port it to a sql database. I am an infant when it comes to anything related to electronics and programming. I have managed to get my remote unit programmed and talking with an xbee radio with a xbee explorer. It even shows the data on a serial monitor. Now I am trying to figure out how to use the second XBEE/Mayfly to collect the data from the remote unit and post it to the SQL database. What I need to know is what hardware do I need to connect the base station mayfly to the internet and if there are any sample sketches available to show how to get the data to a SQL database on a website? I am using XBEE radios to communicate between the remote station and base station. Since the XBEE headers are occupied, how do I connect the mayfly to an Ethernet shield to connect to my router?
Thanks for the help.
Scott
-
2018-03-27 at 10:10 PM #12201Ok, I was able to get data from a mayfly with ultrasonic sensor to a mayfly connect to a computer via xbee radios. Everything is being read on a serial monitor. Now I want to connect the second mayfOk, I was able to get data from a mayfly with ultrasonic sensor to a mayfly connect to a computer via xbee radios. Everything is being read on a serial monitor. Now I want to connect the second mayfly to the internet so I can forward the data to a sql database. What hardware is needed to connect the mayfly to the internet? I know there is an Arduino Ethernet shield, but is it compatible with the mayfly? I am clueless when it comes to this. So far it has been google and youtube to the rescue to get the mayflys to communicate via xbee radios. However, I haven’t been able to find any tutorials specifically for connecting the mayfly to the internet. Is the mayfly the best option for the gateway, or would it be better to go with a Raspberry Pi or another adruino board?
Thanks for the help.
Scott
-
2018-03-27 at 11:53 PM #12202The easiest way build a base station for relaying data heard via Xbee is to use an Uno Ethernet board (it’s like an Uno but has built-in ethernet hardware, so no separate shield is needed). TheThe easiest way build a base station for relaying data heard via Xbee is to use an Uno Ethernet board (it’s like an Uno but has built-in ethernet hardware, so no separate shield is needed). Then connect the Xbee to the Uno Ethernet and write a script to capture all the incoming Xbee data and send it to the appropriate web site URL. I built several systems like this over the past few years, and they work non-stop relaying several thousand transmissions each day. I’ll post a picture of the boards and the little enclosure I put them in, but it’s all relatively simple and around $100.
If your logger location has Wifi, you could also just use a Wifi-bee module and send data directly to the web from the Mayfly. Or use a GPRSbee to send it via cellular.
As for the database, if you don’t have experience with SQL and HTML, it’s not simple to set up all the database stuff and the supporting web host and pages. That’s how I did it for the past 5 years with our original system, and it’s probably too complicated for most users. But we’ve been developing a new system at http://data.envirodiy.org where users can send their data to the site where it can be stored and can easily be seen with a time series viewer. We’re working on the documentation on how to write the Arduino code for how to send data to the site, but there should be some examples in our Github repository to get you started.
-
2018-03-28 at 10:57 PM #12204Shannon
Thanks for the guidance. I have a friend to do the SQL Database for me, so that shouldn’t be a problem.
These units will go in runoff retention ponds at cattle feed yards to monitor w
ShannonThanks for the guidance. I have a friend to do the SQL Database for me, so that shouldn’t be a problem.
These units will go in runoff retention ponds at cattle feed yards to monitor water levels. Most of the facilities don’t have wifi access, so the WIFI Xbee radio isn’t really an option. The GPRSBee is a good option, but I am looking at about 150 units. The best cell phone network out in my area is the Big Red One. They charge way to much to use their network. We do have AT&T, but the service is sketchy in most areas. Do you know of any lower rate sim cards that may work? These units will only wake one time per day then go back to sleep. Data transmission will be really low. I would like to use GPRSBee if possible, that would allow me to avoid using a mesh networks with XBEE radios.
I am very interested in seeing the photos of the units you built.
Again, thanks for the information.
-
2018-04-08 at 6:02 PM #12219Shannon
I received the Arduino Ethernet board and xbee shield. Now, I am looking for example code to receive the data via xbee from the remote unit and port it to a URL. Is there any example code
ShannonI received the Arduino Ethernet board and xbee shield. Now, I am looking for example code to receive the data via xbee from the remote unit and port it to a URL. Is there any example code you would be willing to share.
Thanks
Scott -
2018-04-09 at 2:47 PM #12220Here’s a couple photos of the UnoEthernet/Xbee receiver I built a long time ago. I has been running non-stop since February 2013 and receives about 4500 transmissions per day. With an averageHere’s a couple photos of the UnoEthernet/Xbee receiver I built a long time ago. I has been running non-stop since February 2013 and receives about 4500 transmissions per day. With an average of 10 parameters per transmission, that’s 16.5 million parameters per year, so this little box has passed over 80 million parameters into my simple database in the past 5 years. I haven’t had to restart it do anything in the past 5 years except once when I had to update the IP address of the destination website nameserver when the host did some updates that resulted in a new address.
The Xbee module is a XbeePro 900Mhz and is mounted to an Xbee adapter board from Adafruit. I drilled holes in the case and bent the LEDs so that they poke through the case you can see the Xbee’s status. It’s held on to the case by the SMA jack of the XbeePro. It’s connected to a coax line that runs to the roof where we mounted a high-gain omnidirectional antenna.
This is what we use for receiving data from all of the stations within about a mile of our research lab. The rest of our dataloggers in other locations send data to the database via cellular modules with a $5/month cell plan from Hologram.io
We have more than 100 loggers streaming live data every 5 minutes, that adds up to around 9 million points per month and over 100 million points per year.
Attachments:
-
2019-01-24 at 10:30 PM #12738I’d also like to transfer data received from the xBee and transmit it to the internet. In my situation, ethernet is not an option. I need to go from the xBee to WiFi. Can I attach an xBee and anI’d also like to transfer data received from the xBee and transmit it to the internet. In my situation, ethernet is not an option. I need to go from the xBee to WiFi. Can I attach an xBee and an ESP8266 to the Mayfly? Or is there a better method?
I’ve been using the Mayfly for two years to log soil moisture levels and record it on the SD. It’s been a great board! Looking forward to getting this setup to transmit to my database. This year, I’ll have roughly 15 Mayfly’s reporting back moisture levels.
Thank you,
Jon-
2019-01-25 at 1:13 AM #12739Digi makes a variety of gateway modules, for bridging an Xbee network to Wifi, Ethernet, or cellular.
https://www.digi.com/products/networking/gateways/xbee-gatewayOr you could build your own and
Digi makes a variety of gateway modules, for bridging an Xbee network to Wifi, Ethernet, or cellular.
https://www.digi.com/products/networking/gateways/xbee-gatewayOr you could build your own and have full control over it and guaranteed compatibility with whatever Xbee modules you’re using. I haven’t needed to build a wifi one yet since the ethernet bridge I built above has been working flawlessly for so long, but it shouldn’t be too hard to replace the UnoEthernet with a Wifi-enabled device, either with or without the help of a Mayfly.
-
-
2018-04-09 at 2:58 PM #12223Here’s the code running on the UnoEthernet/Xbee shown above, but with the URL and IP addresses removed. I based this all from some examples I found about 6 years ago, so there’s probablyHere’s the code running on the UnoEthernet/Xbee shown above, but with the URL and IP addresses removed. I based this all from some examples I found about 6 years ago, so there’s probably better ways to do this nowadays.Arduino123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105/*Feb 18, 2013With Xbee radio attached to pins 2 and 3, and ethernet shield connected to Arduino (or use Uno Ethernet),this sketch takes any captured string and sends it to a URL of a server running a php scriptthat captures the data and writes it to a mySQL database*/#include <SPI.h>#include <Ethernet.h>#include <SoftwareSerial.h>SoftwareSerial xbeeSerial(2, 3); // RX, TXString readString = ""; //temporary string to store the incoming xbee databoolean stringComplete = false; // whether the string is completebyte mac[] = { 0x22, 0x22, 0x55, 0x55, 0x99, 0x99 }; // put the unique MAC address of your Uno ethernet board hereIPAddress server(192, 555, 999, 999); // IP address of the name server for where your php script residesEthernetClient client;void setup() {// start serial port:Serial.begin(57600);xbeeSerial.begin(2400); //The Xbee 900mhz module has trouble capturing faster than 2400baud with the UnoEthernet//so be sure to program the Xbee module's baud rate beforehand using XCTUSerial.println("sends entire captured string (with full url) to whatever URL is captured");Serial.println("Also resests the ethernet connection if it gets disconnected at some point");// start the Ethernet connection:if (Ethernet.begin(mac) == 0) {Serial.println("Failed to configure Ethernet using DHCP");// DHCP failed, so use a fixed IP address:}}void loop() // run over and over{//delay(100);if (stringComplete) {Serial.print("CapturedString: ");Serial.print(readString);//delay(1000);sendData(readString); //goes to URL and posts the data// clear the string:Serial.println("Clearing string...");readString = "";stringComplete = false;}if (xbeeSerial.available() >0) {char c = xbeeSerial.read(); //gets one byte from serial buffer//if((c>='0' and c<='9') || c==' ')//{//Serial.print(c);readString += c; //makes the string readString//}if (c == '\n') {stringComplete = true; }//Serial.write(xbeeSerial.read()); prints each character if you really want to see each one as it comes in}}void sendData(String thisData) {// if there's a successful connection:Serial.println("connecting to server...");if (client.connect(server, 80)) {Serial.println("connected");// Make a HTTP request:client.print("GET http://www.somewebsite.com/demo.php?"); //place your complete URL address hereclient.println(thisData);client.println(" HTTP/1.0");client.println("Host: http://www.somewebsite.com");client.println();client.stop();Serial.println("Data sent to the website");delay(100);}else {Serial.println("internet connection failed");delay(1000);//reset the Arduino module to hopefully fix the dropped internet connectionclient.stop();delay(1000);Ethernet.begin(mac);delay(1000);}} //end sendData
-
2018-04-09 at 9:47 PM #12224
Shannon
Thank you very much. This is exactly what I am wanting to do. I appreciate your willingness to help.
Scott
-
2018-04-19 at 6:33 PM #12250
Shannon
Can you tell me where you source your cellular modules?
Thanks
Scott
-
2018-04-19 at 8:23 PM #12251As mentioned above, I use lots (100+) of GPRSbee modules, they are available from SODAQ in the Netherlands. They are 2G, so they only work in certain areas, but we find there’s coverage in abouAs mentioned above, I use lots (100+) of GPRSbee modules, they are available from SODAQ in the Netherlands. They are 2G, so they only work in certain areas, but we find there’s coverage in about 90% of our locations. There are 3G and 4G bee modules available from other companies like Digi, but they cost at least twice as much so we usually just use the GPRSbees.
-
2018-04-22 at 2:19 AM #12253Shannon
I got your code to communicate with MySQL database. I have a table set up for ID(auto-increment, primary key) TimeStamp, and thisData. The auto increment ID and TimeStamp work, but the data
ShannonI got your code to communicate with MySQL database. I have a table set up for ID(auto-increment, primary key) TimeStamp, and thisData. The auto increment ID and TimeStamp work, but the data is not populating the table, column is there, it is just blank. I do get data on the serial monitor. I’m guessing the problem is in the php file of the database setup.
Any Ideas?
-
2018-04-22 at 12:24 PM #12254There’s a lot of things that could cause your data to now show up in the table, either on the Arduino end or the server/PHP end. Have you tried visiting the URL using your web browser to make sThere’s a lot of things that could cause your data to now show up in the table, either on the Arduino end or the server/PHP end. Have you tried visiting the URL using your web browser to make sure you’re able to post data to the table using a properly formatted URL? If you can do it with a browser, then you know your PHP code is right and the issue is with your Arduino sketch. But if you can’t add data to the table via your browser, then you’ll need to fix your PHP code on the server.
-
2018-04-22 at 12:56 PM #12255Ok, I can post data to the database via the URL, so the problem is somewhere in the Arduino code. I’m using your code above at my base. I changed all the required parameters to my network settOk, I can post data to the database via the URL, so the problem is somewhere in the Arduino code. I’m using your code above at my base. I changed all the required parameters to my network settings. It appears the Arduino Ethernet is communicating with the website as the php script is inserting the id and timestamp in the database table. I’m a little confused with the Arduino code. The php script is looking for “thisData” from the Arduino. Is that the string that is sent from your code above?
Thanks for the help.
Scott
-
2018-04-22 at 1:46 PM #12256The code I posted above is for the Arduino/Xbee receiver module. All it does is “visit” a URL that it “hears” on the radio. The Mayfly logger in the field is the unit that acThe code I posted above is for the Arduino/Xbee receiver module. All it does is “visit” a URL that it “hears” on the radio. The Mayfly logger in the field is the unit that actually generates the rest of the URL. I put the beginning of the URL in the receiver code above just for simplicity, but in real life the entire URL is generated on the field loggers because sometimes they visit different PHP scrips or domains. If you have more than one logger sending data, you’re going to want to have different tables for each station. Then you have the parameters to send. So the logger payload that goes into “thisData” in the example would be a string that should look something like this: UnitId=001&Temperature=14.2&Voltage=2.5&Depth=342.5
And the full URL would be: https://www.somewebsite.com/demo.php?UnitId=001&Temperature=14.2&Voltage=2.5&Depth=342.5
Your PHP script would then put the 3 parameters into the table name designated by “UnitId”.
-
2018-04-22 at 2:00 PM #12257Ok, so it is the code on my sensor/logger that needs to be changed. Do you by chance have any example code that I can look at to try and figure out where I need to go? The sensor is an ultrasonic seOk, so it is the code on my sensor/logger that needs to be changed. Do you by chance have any example code that I can look at to try and figure out where I need to go? The sensor is an ultrasonic sensor. I have attached the code I am using for the sensor. This code will change as I only want to send data one time per day.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322[code]#include <Wire.h>#include <avr/sleep.h>#include <avr/wdt.h>#include <SPI.h>#include <SD.h>#include <RTCTimer.h>#include <Sodaq_DS3231.h>#include <Sodaq_PcInt_PCINT0.h>#include <SoftwareSerial_PCINT12.h>const int SonarExcite = 10;SoftwareSerial sonarSerial(11, -1);boolean stringComplete = false;#define READ_DELAY 1//RTC TimerRTCTimer timer;String dataRec = "";int currentminute;long currentepochtime = 0;float boardtemp = 0.0;int batteryPin = A6; // select the input pin for the potentiometerint batterysenseValue = 0; // variable to store the value coming from the sensorfloat batteryvoltage;int range_mm;//RTC Interrupt pin#define RTC_PIN A7#define RTC_INT_PERIOD EveryMinute#define SD_SS_PIN 12//The data log file#define FILE_NAME "SonicLog.txt"//Data header#define LOGGERNAME "Ultrasonic Maxbotix Sensor Datalogger"#define DATA_HEADER "DateTime,Loggertime,BoardTemp,Battery_V,SonarRange_mm"void setup(){//Initialise the serial connectionSerial1.begin(9600);sonarSerial.begin(9600);rtc.begin();delay(100);pinMode(8, OUTPUT);pinMode(9, OUTPUT);pinMode(SonarExcite, OUTPUT);digitalWrite(SonarExcite, LOW); //pin 10 is the power pin for the ultrasonic sensorgreenred4flash(); //blink the LEDs to show the board is onsetupLogFile();//Setup timer eventssetupTimer();//Setup sleep modesetupSleep();Serial1.println("Power On, running: ultrasonic_logger_example_1.ino");}void loop(){//Update the timertimer.update();if(currentminute % 2 == 0) //if the time ends in an even number, a sample will be taken. Can be changed to other intervals{digitalWrite(8, HIGH);dataRec = createDataRecord();delay(500);digitalWrite(SonarExcite, HIGH);delay(1000);range_mm = SonarRead();digitalWrite(SonarExcite, LOW);stringComplete = false;//Save the data record to the log filelogData(dataRec);//Echo the data to the serial connectionSerial1.println();Serial1.print("Data Record: ");Serial1.println(dataRec);String dataRec = "";digitalWrite(8, LOW);delay(500);}systemSleep();}void showTime(uint32_t ts){//Retrieve and display the current date/timeString dateTime = getDateTime();//Serial.println(dateTime);}void setupTimer(){//Schedule the wakeup every minutetimer.every(READ_DELAY, showTime);//Instruct the RTCTimer how to get the current time readingtimer.setNowCallback(getNow);}void wakeISR(){//Leave this blank}void setupSleep(){pinMode(RTC_PIN, INPUT_PULLUP);PcInt::attachInterrupt(RTC_PIN, wakeISR);//Setup the RTC in interrupt modertc.enableInterrupts(RTC_INT_PERIOD);//Set the sleep modeset_sleep_mode(SLEEP_MODE_PWR_DOWN);}void systemSleep(){//Wait until the serial ports have finished transmittingSerial1.flush();Serial1.flush();//The next timed interrupt will not be sent until this is clearedrtc.clearINTStatus();//Disable ADCADCSRA &= ~_BV(ADEN);//Sleep timenoInterrupts();sleep_enable();interrupts();sleep_cpu();sleep_disable();//Enbale ADCADCSRA |= _BV(ADEN);}String getDateTime(){String dateTimeStr;//Create a DateTime object from the current timeDateTime dt(rtc.makeDateTime(rtc.now().getEpoch()));currentepochtime = (dt.get()); //Unix time in secondscurrentminute = (dt.minute());//Convert it to a Stringdt.addToString(dateTimeStr);return dateTimeStr;}uint32_t getNow(){currentepochtime = rtc.now().getEpoch();return currentepochtime;}void greenred4flash(){for (int i=1; i <= 4; i++){digitalWrite(8, HIGH);digitalWrite(9, LOW);delay(50);digitalWrite(8, LOW);digitalWrite(9, HIGH);delay(50);}digitalWrite(9, LOW);}void setupLogFile(){//Initialise the SD cardif (!SD.begin(SD_SS_PIN)){Serial1.println("Error: SD card failed to initialise or is missing.");//Hang// while (true);}//Check if the file already existsbool oldFile = SD.exists(FILE_NAME);//Open the file in write modeFile logFile = SD.open(FILE_NAME, FILE_WRITE);//Add header information if the file did not already existif (!oldFile){logFile.println(LOGGERNAME);logFile.println(DATA_HEADER);}//Close the file to save itlogFile.close();}void logData(String rec){//Re-open the fileFile logFile = SD.open(FILE_NAME, FILE_WRITE);//Write the CSV datalogFile.println(rec);//Close the file to save itlogFile.close();}String createDataRecord(){//Create a String type data record in csv format//TimeDate, Loggertime,Temp_DS, Diff1, Diff2, boardtempString data = getDateTime();data += ",";rtc.convertTemperature(); //convert current temperature into registersboardtemp = rtc.getTemperature(); //Read temperature sensor valuebatterysenseValue = analogRead(batteryPin);batteryvoltage = (3.3/1023.) * 1.47 * batterysenseValue;data += currentepochtime;data += ",";addFloatToString(data, boardtemp, 3, 1); //floatdata += ",";addFloatToString(data, batteryvoltage, 4, 2);return data;}static void addFloatToString(String & str, float val, char width, unsigned char precision){char buffer[10];dtostrf(val, width, precision, buffer);str += buffer;}int SonarRead(){int result;char inData[5]; //char array to read data intoint index = 0;while (sonarSerial.read() != -1) {}while (stringComplete == false) {if (sonarSerial.available()){char rByte = sonarSerial.read(); //read serial input for "R" to mark start of dataif(rByte == 'R'){//Serial.println("rByte set");while (index < 4) //read next three character for range from sensor{if (sonarSerial.available()){inData[index] = sonarSerial.read();//Serial.println(inData[index]); //Debug lineindex++; // Increment where to write next}}inData[index] = 0x00; //add a padding byte at end for atoi() function}rByte = 0; //reset the rByte ready for next readingindex = 0; // Reset index ready for next readingstringComplete = true; // Set completion of read to trueresult = atoi(inData); // Changes string data into an integer for use}}dataRec += ",";dataRec += result;return result;}[/code]
-
2018-04-22 at 3:06 PM #12258Where did you get that code example? It looks like a combination of some older code I used to use plus some newer stuff, but there are several mismatches and missing things so it won’t work proWhere did you get that code example? It looks like a combination of some older code I used to use plus some newer stuff, but there are several mismatches and missing things so it won’t work properly as written. To transmit on an Xbee module, you should use Serial1. Serial0 is the port you should use for printing to the serial monitor. Your example above has all the status stuff happening on Serial1, so that should be changed to just Serial and then you can transmit the Xbee string payload on Serial1, since that’s the default configuration of the solder jumpers on the back of the Mayfly.
Once you have taken whatever sensor measurement you want, you can build a data record string append to the date/time/battery/boardtemp string and then write it to the memory card, and then also use those same variables to build the URL string in a separate function. Then just send that URL string to the Xbee serial port (assuming you’ve turned on the Bee module in advance, I use the pin-sleep configuration so I’m able to toggle the Beee module on and off).
Also, in your code above, the onboard battery voltage measurement part in the createDataRecord has the ratio as 1.47, which is only correct for Mayfly boards v0.3 and 0.4. For boards v0.5 and above, the ratio is 4.7. Which version of Mayfly do you have?
-
2018-04-22 at 5:23 PM #12263I’m 99% sure most if not all of this code is yours or someone associated with Envirodiy. If you can’t tell, I know very very very little about arduinos. I have a friend that put this togI’m 99% sure most if not all of this code is yours or someone associated with Envirodiy. If you can’t tell, I know very very very little about arduinos. I have a friend that put this together for me and I pointed him to this website for guidance. I’m sure he used the copy and paste method for coding. He didn’t have time to work with the xbee radios, so I took the code and changed things to serial1 to try and get the communication to work. It works, but obviously it isn’t the way things should be done. I have the V0.3 boards. I got them when you first went live with them. They are great boards and fun to play with.
The plan is to take the sonar reading, battery voltage, and date string send it to the base unit then have the base unit send it to the website and MySQL database. I would also like to save the string to an SD card at the base station. This way I have a backup if the network should go down.
You mentioned having a table for each sensor in the database. I could have up to 15 sensor loggers communicating to the base station in 1 to 5 minute intervals for one client. Is it possible to combine the strings from all sensor loggers into one and send it to one table in the database? The sensors will be setup on individual ponds, then the report would look like:
Pond 1, Pond 2, Pond 3, etc.These could probably be inserted into separate tables in the database then generate a report to combine them by date read.
This is getting way over my head. I appreciate all the help and code examples you are willing to share.
Scott
-
2018-04-30 at 4:43 PM #12277Most of your code looks familiar, though very mish-mash. I’m glad it works.
As far as getting the data into a website or MySql database… Doing that is all going to be the responsibility
Most of your code looks familiar, though very mish-mash. I’m glad it works.As far as getting the data into a website or MySql database… Doing that is all going to be the responsibility of your web receiver, that is, whatever website the internet connected radio receiver visits. You have to use your php or whatever set up for that.
Have you looked at the Wiki Watershed/EnviroDIY data portal? http://data.envirodiy.org/ If you are able/willing to have your data publicly viewable, you can take advantage of the structure already in place there to store/view/graph your data. We’ve also created a library to simplify sending data there from many different kinds of sensors, including the Maxbotix sonar sensors. https://github.com/EnviroDIY/ModularSensors. The communication with the data portal in this library is assumed to be via direct internet connection (cell/wifi) but you could also use most of the functionality and set it to another radio instead.
-
2018-04-30 at 5:14 PM #12278Sara
Thanks for the information on the data portal. I would like to use it for the simplicity, but I’m sure my clients would not like to have their data publicly available.
I have the datab
SaraThanks for the information on the data portal. I would like to use it for the simplicity, but I’m sure my clients would not like to have their data publicly available.
I have the database set up and the php script working to add the data to the database. Now I just need to get the sensor data sent to the database. I was confused on how Shannon’s code worked. After her explanation I think I have an idea. Basically my sensor code needs to be changed to create a string with the website address and the sensor data, and time stamp. I have spent several days reading examples trying to figure out how to generate the script. Finally last night I found one that I believe does what I need it to. Now I just have to sit down and figure out what parts of the existing code I don’t need and remove it. This is all way above my pay grade, so anything I come up with will not look right and probably won’t be the most efficient way to tie everything together. Add that to my lack of knowledge and that always makes if fun to try and figure out where the problems are.
Thanks for the help.
Scott
-
2018-04-30 at 5:19 PM #12279
FYI, the link to the data portal is not working. Or at least it isn’t working for me.
-
2018-04-30 at 5:25 PM #12280
It appears that the forum software is adding https to links. If you just type data[dot]envirodiy[dot]org into your browser you should be able to reach the data portal.
-
-
2018-04-30 at 5:28 PM #12281
Thank you Heather.
-
-
AuthorPosts
- You must be logged in to reply to this topic.