att m2x file upload#q=at&t m2x image storage
What IoT really stands for? In order to analyze in more than depth, the subject nosotros demand to define some basic concepts nearly this kind of young technology. IoT is the acronym of Cyberspace of Things, a network of hardware, mainly used for automation and information logging in order to simplify every twenty-four hours tasks both in industry and in every 24-hour interval life. Unremarkably these kind of equipment are connected together to grade a network over the net.
The showtime mentioning of IoT was made in 1999 by Kevin Ashton during one of his presentation. Todays IoT is all around united states starting from simple smart gadgets mainly designed for home and office use till serious surveillance and security systems used past the military and airports.
As y'all can meet on the first prototype a basic IoT network is made out of iii components. The first, WeMos the starting point of the chain – takes care of collecting data and transmitting to the closest WiFi hotspot. The second is a common WiFi equipped router, links the WeMos to the internet. The tertiary one is AT&Ts deject service, chosen M2X. No, information technology is not full of vegetables as presented on the film. Information technology takes intendance of collecting and storing the data transmitted by the WeMos.
Merely how can we setup fast and for low toll such a device? Actually it is more inexpensive and easy as it sounds. There are several online platforms available nowadays for IoT projects. One of the best is called M2X and it is developed by AT&T corporation. Its costless version has some limitations of course, but comes with a lot of advantages:
- Large and explicit documentation
- Huge number of APIs for numerous environments similar Arduino, Python, PHP, C, Java, JavaScript, .Cyberspace and many others
- Piece of cake to utilise
- Ready made charts, maps and triggers
One of the cheapest hardware solution I could detect for WiFi based applications is the and then called WeMos D1 R2, which cost me effectually 7 euros from a local shop here in Košice. Which is a good price if we keep in listen what nosotros get for that price, lets see the specifications:
- eighty or 160MHz selectable operating frequency
- eleven IO pins: one analog input, PWM/I2C/one-wire support (except D0 pin)
- 3v3 voltage level
- 4MB wink
- ESP8266 chipset
- Http host and customer support
- Wifi capability
At that place are two methods how you can hands wink the Wemos D1:
- Arduino IDE: it is possible to write and compile software directly in Arduino official IDE, with the necessary libraries installed, in C/C++ linguistic communication, this commodity will deal with this method.
- NodeMCU: the original IDE for managing these boards, its language is Python
Hopefully you already have the latest Arduino IDE downloaded and installed on your PC, if non y'all can go it from this link: arduino-ane.8.7-windows.exe
Step 1:
Burn it up, and go to File -> Preferences (or shortcut Ctrl + comma ) , than copy the post-obit address into the Additional Boards Managing director URLs:http://arduino.esp8266.com/stable/package_esp8266com_index.json
Step two:
After this stride, go to Tools -> Board: "current board" -> Boards Director. In the search bar type ESP82666, and download the ESP8266 library developed by ESP8266 Customs.
Later installing the library select the respective lath (in this case WeMos D1 R1), from Tools -> Lath: "WeMos D1 R1".
Information technology is recommended to try flashing your board earlier getting into more serious things with a uncomplicated Blink lawmaking, to verify if the installed libraries are upward and running fine. For this task you tin can find a lot of examples nether Files -> Examples.
Step 3:
If everything went every bit it was supposed to be it is time to download the library for Arduino from AT&T Github page (link: https://github.com/attm2x/m2x-arduino ) and install it with the in-congenital *.goose egg installer, (Sketch -> Include Library -> Add .Aught library).
Step 4:
For now nosotros are finished with the necessary hardware and software grooming, it is fourth dimension to create a new account or login into the existing one, at https://m2x.att.com and create a new device.
The concluding step on the AT&Ts website is to Add a new stream to the device.
Step v:
Everything is prepare to examination out the setup. For this paste this code into your IDE:
1 2 3 4 5 vi 7 viii 9 10 11 12 13 14 15 xvi 17 18 19 xx 21 22 23 24 25 26 27 28 29 xxx 31 32 33 34 35 36 37 38 39 xl 41 42 43 44 45 46 47 48 49 fifty 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | #include <ESP8266WiFi.h> #define ESP8266_PLATFORM #include "M2XStreamClient.h" char ssid [ ] = "modify it" ; // your network SSID (proper name) char pass [ ] = "modify it" ; // your network countersign (use for WPA, or utilise equally key for WEP) int keyIndex = 0 ; // your network key Index number (needed only for WEP) int status = WL_IDLE_STATUS ; char deviceId [ ] = "GET Information technology FROM M2X" ; // Device you want to push to char streamName [ ] = "GET Information technology FROM M2X" ; // Stream you want to push button to char m2xKey [ ] = "Get Information technology FROM M2X" ; // Your M2X access key const int temperaturePin = 0 ; WiFiClient client ; M2XStreamClient m2xClient ( & client , m2xKey ) ; void setup ( ) { Serial . begin ( 9600 ) ; while ( status != WL_CONNECTED ) { Serial . print ( "Attempting to connect to SSID: " ) ; Serial . println ( ssid ) ; // Connect to WPA/WPA2 network. Change this line if using open or WEP network: status = WiFi . brainstorm ( ssid , pass ) ; // wait 10 seconds for connection: filibuster ( 10000 ) ; } Serial . println ( "Connected to wifi" ) ; printWifiStatus ( ) ; } void loop ( ) { int randomValue = random ( 1995 ) ; //generating a random number between 0 - 1995 Serial . print ( "random value: " ) ; Serial . println ( randomValue ) ; int response = m2xClient . updateStreamValue ( deviceId , streamName , degreesC ) ; Series . print ( "M2x customer response code: " ) ; Serial . println ( response ) ; if ( response == - 1 ) while ( 1 ) ; delay ( 1000 * 60 ) ; // sends a random value every i minutes } void printWifiStatus ( ) { // impress the SSID of the network you're attached to: Serial . print ( "SSID: " ) ; Serial . println ( WiFi . SSID ( ) ) ; // impress your WiFi shield's IP address: IPAddress ip = WiFi . localIP ( ) ; Serial . print ( "IP Address: " ) ; Serial . println ( ip ) ; // print the received signal strength: long rssi = WiFi . RSSI ( ) ; Serial . print ( "signal strength (RSSI):" ) ; Series . print ( rssi ) ; Series . println ( " dBm" ) ; } |
I would like to mention that I am not the author of this source code, I accept but modified the original example code that was included in the examples library by AT&T.
After uploading the source code to the WeMos D1 and refreshing M2X you should see the incoming data from your device, something similar as mine on the right.
Look! There are more possibilities with M2X! You can create custom dashboards, where yous tin add widgets like charts (bar, radial), stream activity, geographic maps. Also these widgets can exist embedded into external websites, like the ane below:
Basically this would be the main idea behind IoT, how yous send information to a remote server and shop information technology. Of course there is much more what could exist done, like sending commands to the WeMos D1 R2 or storing and besides analyzing the remotely received information. This will exist an other article, how many other things you can exercise with these inexpensive equipment. Possibilities are unlimited.
Source: http://fodor95.com/2018/12/getting-started-with-wemos-d1-and-att-m2x-iot-platform/
Belum ada Komentar untuk "att m2x file upload#q=at&t m2x image storage"
Posting Komentar