Hot answers tagged

41

There are many different type of RF networks with various advantages and disadvantages. The main things I consider when choosing a wireless communication method are network topology, data rate and power consumption. WiFi: High data rate (54Mbit/s +) but also high power consumption. Used when you need to connect directly to the internet, such as an internet-...


25

You have a few options for connecting your Arduino to the network/Internet. Ethernet Something like the Arduino Ethernet Shield allows you to plug in an Ethernet cable from the wall or router into your Arduino. Obviously, the main limitation is that your device is now tethered by the cable. For outdoor use, I wouldn't do this. WiFi The Arduino WiFi ...


12

I don't see any reason not to use Arduino in an industrial, engineering, or laboratory environment, if it meets your needs and does the job well. It is highly recommended, however, that you provide some sort of pin protection to keep industrial noise or voltage spikes from frying pins. Minimum pin protection could consist of using current-limiting resistors (...


12

Yes, normally the last WiFi credentials will be saved in flash and the ESP8266 loads this data on bootup and reconnect to the last known WiFi. See https://github.com/esp8266/Arduino/issues/2843#issuecomment-334250100: the SDK stores some info, including the wifi credentials, in a sector of the flash. That sector is kept between flashings to allow ...


11

I'm aware of a few JSON parsing libraries for Arduino. aJSON Arduino JSON Parser JSON Arduino I've never used any of these but I did do some simple JSON parsing in a project I'm working on so I'll show you how I did that. NOTE: I'm reading serial data using the software serial library. You'll need to change this code to work for you. This will only work ...


9

You should search for this data yourself, but since you are saying you are a newbie I'll tell you how to find this. First of all you should search for a document called "datasheet". On a datasheet the producer writes all the relevant data about his product. In your case, you should search for the electrical characteristics of the ESP8266. For instance here ...


8

There are a number of considerations that need to be made when considering any wireless communication solution over long distances and over water. WiFi is capable of working over long distances especially with higher power cards (1W ones are now readily available) and directional antenna (anything from 3dBi to 30dBi of gain). There are advantages and ...


8

Some months have passed since my previous answer and now the ESP8266 based WiFi modules are available. They get connected to your project serially (3.3V) and are controlled in a modem like way using AT commands. With a pricing of round about $5 they fit the question better than my previous OpenWrt based answer. For more information about ESP8266 ask your ...


8

I wouldn't use the Arduino in an industrial environment, as I wouldn't trust its PCB to be able to handle much noise. Use the Arduino and shields to prototype your application, and then move to a circuit board that uses proper techniques suited to an industrial environment.


7

I have programmed a class that will receive char by char the JSON document. It only will store in memory a few bytes for known JSON structure using a state machine and the results you need. So you can query the class for the results you want and will process the JSON. Its ideal for your purpose. I have used for connecting to a weather service that returns a ...


7

The very first thing I notice is that your WiFi antenna is shielded by the PCB. That is the antenna is placed right over the top of the ground plane of the PCB and your range is going to be severely limited. You will notice on the NodeMCU design below that they have placed a PCB cutout where the antenna is located. In other pictures you can also see that ...


6

Oh wow, so many ways you could do this. To start, get an arduino with a wifi shield to transmit and read data. Familiarize yourself with how the arduino works with the shield, and how to read it on the other end. Then it's time to look at sensors you could use. Here's a couple ideas, I would recommend using more than one and cross-checking: Force sensor ...


6

For a soft seat you could sense occupancy with an LED and photo-sensor at opposite ends of a short somewhat flexible tube that gets flexed when the cushion compresses, interrupting the light. That or a microswitch would have to be the cheapest means of sensing. Getting from there to the server depends a little on how much work you're willing to do, from ...


6

Well, your questions is quite vague and perhaps overly broad. I'll answer your main question "what is the smallest," assuming you meant dimensionally, while keeping in mind that you also want the most powerful one in that size. The pricing of different chips like this will be fairly similar so I'll ignore that. Next, I'm not sure what you meant by saying "...


6

The best and easiest solution I've found is to use the Bluefruit EZ-Link from Adafruit. They have a module you plug into the Serial/Power/reset pins (link here) or a shield for the uno (link here). They've also got a great description and how-to guide (link here) that is pretty good. It basically appears as a serial bluetooth link in the arduino IDE and ...


6

You're actually entering into a very tricky and difficult area. Yes, having a plain text password in your sketch is a risk. It is stored in flash as plain text. If an attacker can gain access to the contents of the flash through some means (whatever they may be) then they could obtain that WiFi password. You would think that encrypting the password would ...


6

I would bet that the built-in LED pin is also the TX pin for the serial interface. Check here, LED Pin section: http://www.esp8266.com/wiki/doku.php?id=esp8266_gpio_pin_allocations LED Pin GPIO1, which is also TX, is wired to the blue LED on many devices. Note that the LED is active low (connected to Vcc and sinks through the chip to ground) so ...


6

You cannot use that "library". Simply because that isn't a library, that is a core. It's the entirety of the Arduino API designed to run on an ESP8266. You can use it to program the ESP8266 directly and nothing else. No part of that has anything at all to do with Arduino boards like the Uno.


5

I'm not going to answer this directly, because then you wouldn't learn anything! However, here are a few suggestions: Use a pressure sensor on the seat of the chair or Put a distance sensor (IR or ultrasonic) pointing at the chair. Use the official Arduino WiFi shield.


5

What you're looking for is a SMTP (Simple Mail Transport Protocol) library. A Google search finds 2 for the Arduino: SMTPClient This seems to be a minimal-capability SMTP-only library that piggybacks on top of a connection library. FullIP This seems to be a full IP package for the Arduino that works with select network devices which includes SMTP ...


5

As I didn't get any answer, and further search for an existing solution failed, I decided to roll my own. The class header is very straightforward, I decided to go for single inheritance and composition of Adafruit_CC3000_Client: class CC3000Client: public WiFiClient { public: CC3000Client(Adafruit_CC3000& cc, Stream& stream=Serial); virtual ...


5

It does seem possible, check out this thread on Arduino forums, where cpixip worked directly with the NRF24 SPI interface to accomplish that. Here is the code he published, in case the link won't be available: #include <SPI.h> // Poor Man's Wireless 2.4GHz Scanner // // uses an nRF24L01p connected to an Arduino // // Cables are: // SS -&...


5

From your question it implies that the Spark IO use the Arduino IDE - it's not. It has two different IDE's, one is web based and the other is downloadable. In addition, it's not an Arduino per-se. It is based on the Wiring library, which is similar to the Arduino library but not exactly the same. And of course the MCU is not Atmel, but that is also the case ...


5

Industruino just came out a couple days ago: https://blog.arduino.cc/2015/09/21/industruino-makes-industrial-automation-easy-now-atheart/ https://industruino.com/page/home https://www.youtube.com/watch?t=200&v=MhE1zlwsUu0 https://industruino.com/shop/product/industruino-ind-i-o-kit-2 Also: 1. Ruggeduino has much better pin protection than a ...


5

Since all of the data pins use 5 V, one of the solutions is to use a voltage regulator, such as LM2596. You do not want a voltage regulator you need a level shifter. You can buy them cheaply or make them up with a transistor or MOSFET. I gather the ESP8266 has a Tx (transmit) to the Arduino. You probably don't need to level-shift that, as the Arduino Uno ...


5

I have found that this was caused by reading the analog pin to many times in a short period of time. I replaced ldrState = map(analogRead(ldrPin), ldrMin, ldrMax, 0, 100); Serial.println(analogRead(ldrPin)); if (serialCount == 1000) { Serial.println(ldrState); serialCount = 0; } else { serialCount ++; } with this: if (serialCount == ...


5

This is an old question that has been answered, but I would like to offer a slightly more elegant solution (IMO!): In my method which reads the analog data, I check and only read every 50 milliseconds: void readAnalogSensor() { if( millis() % 50 != 0 ) return; . . // Do your sensor read and processing here . } This avoids having to ...


5

It looks like you can use the send_P function to send raw PROGMEM data: void send_P(int code, PGM_P content_type, PGM_P content, size_t contentLength); I.e., (from what I can gather): PGM_P favicon = { 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x10, 0x10, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00, 0x68, 0x03, 0x00,......... 0x00 }; server.send_P(200, "image/x-...


5

The WiFiClient.h header and WifiClient.cpp source files are useful for reference. Is the best data structure a linked list? Probably not here. Possibly not ever. It's a load of effort to implement, and won't give you any benefit. Just create an array of them: WiFiClient clients[5]; Then perhaps something like WiFiClient newClient = server.available(...


Only top voted, non community-wiki answers of a minimum length are eligible