How to program the SCPI protocol in Arduino? - arduino

I want to make an Arduino program that only makes requests for voltage measurement of some sensors through the SCPI protocol connected by RS232. I have found several libraries created by users but they have many unnecessary functions for what I want to do.
Specifically, what is the command to be sent by the RS232 to request the desired sensor voltage?
Thanks.

Try using : Arduino SCPIParser Library by LachlannGunn available on GitHub.

Related

how to communicate between openmote and arduino?

I'am working on an IOT project. The goal is to communicate between two openmotes (one is the server and one is the client). When the client receives some data, it is supposed to pass it to an arduino to activate different controllers (like a motor, some leds ...). So, I wanna send data from a openmote to an arduino. The idea is to use a bus. The openmote is the master and the arduino is the slave. Do you have any idea how to do this ? I can't find any documentation fro the open mote part. I thought about using the serial UART but i don't have any idea how to do that.
Thank you !
If anyone is looking for an answer, it is possible to activate the UART 1 on the open mote and to send data to the arduino using that bus. You have to pay attention to the speed you are using on both sides.You can refer to this file to see the functions to use: https://github.com/contiki-os/contiki/blob/master/examples/cc2538-common/test-uart.c

Best way to transfer data from Arduino to Server

I am new to Arduino and I would like to do a project that sends data, remotely. So, the Arduino would not be connected to Wifi/Bluetooth, Ethernet, etc. Would using a GSM shield be the best way to transfer data? I do not need to make phone calls or send SMS (unless sending SMS would be a better, more reliable, option) just data to a server, who's app I would create. If this is the best option, what else would I need to make this happen? For example, on top of the GSM shield (I am looking at something cheap like this: https://www.amazon.com/Geeetech-SIMCOM-Quad-band-Development-Arduino/dp/B00A8DDYB6/ref=sr_1_2?ie=UTF8&qid=1467651878&sr=8-2&keywords=Arduino+GSM+Shield) what other charges would I need to pay? I.E. would I also need to get another phone plan? Would I have to pay for a gateway service that would receive the cell phone data and then send it to my server?
Thanks your any thoughts on this
Wifi, ethernet or GSM, it depends on what you want to use, and what you have.
With all three you can send data to a server.
There is a bench of Arduino shields. All shields from Arduino come with a library to handle communication.
Other shields from other vendors exist and they provide their libraries too.
For Ethernet you can check the arduino shield https://www.arduino.cc/en/Main/ArduinoBoardEthernet.
For Wifi there are plenty. You have first the arduino shield. You can also take a look at the CC3000. Or the famous ESP8266. For all three you can find libraries.
For GSM, Arduino has a shield and a library. Arduino uses the Quectel M10 GSM moduel. You can find lots of examples in the arduino website and all over the net (https://www.arduino.cc/en/Guide/ArduinoGSMShield).
There exist other shields like the one you mentioned. Libraries does exist for those "other" shields however they are not as maintained as the arduino one.
You need to be careful though, you'll find over Amazon (and most likely on Alibaba) some GSM modules like SIM900A that are way cheaper, those are only dual band and will work only on certain contries.
There is another cheap GSM Module called the A6. It was made by espressif the company behid the ESP8266. It's relatively new and no library exist for it at the time. You can write you own functions to use it, but that would be some extra work.
In all cases, to use a GSM module you'll need a sim card with it's phone plan and all.
Another thing to consider is how to power these shields. They use more power than an Arduino can generate (A GSM modules datasheet recommend to use a power supply that can deliver up to 2A). If you power them straight from the Arduino, you may encounter some strange behaviour.
So the ideal way is to have for them an external power supply with the required amps and have a commun ground with the Arduino.

Talk to I2C Devices connected to Arduino from Processing

I want to talk to devices that are connected to an Arduino from the Processing IDE and interface with the I2C communications protocol. The processing language is used to send command and data bytes to the arduino with the Firmata protocol. This is done with an existing arduino and Firmata library. I have been going through the library and it seems that there is functionality on both the Arduino and Processing sites to support I2C communication to devices connected to the Arduino, but there is no method to do that from processing. I have tried to create a method to do that but I couldn't get anywhere.
Can someone please help me ?
To anyone who might be interested of, I have found a solution to extend Processing Firmata Library to support additional features.
Based on this tutorial http://www.instructables.com/id/Going-Beyond-StandardFirmata-Adding-New-Device-Sup/ you have to edit Processing Arduino and Firmata Library, which are written in Java. Then compile the two and replace them in the source folder.
Then follow the tutorial to extend the Arduino Firmata Library on the Arduino end.

Can I read iBeacon data using Arduino?

I am using an HM-10 module and Arduino UNO.
My requirement is to read data from ibeacons near me using Arduino. Is it possible? I have not been able to find any articles on this. All articles talk about connecting your android phone with arduino. Any idea?
Yes, it is possible. I'm using an HM-10 as an iBeacon detector (linksprite.com BLE 4.0 shield), and it is successfully detecting a RadBeacon running in iBeacon mode. Firmware on my HM-10 is version 540.
Before it would detect the RadBeacon, I had to send the HM-10 the following commands:
AT+ROLE1
AT+IMME1
AT+RESET
Then I used the AT-DISI? command, and the serial monitor is showing the broadcast received from the RadBeacon (and one other beacon) as follows (for example):
OK+DISISOK+DISC:4C000215:2G234454CF6D5A0FADF2F4911BA9FFA7:00000001AC:0CF3EE041CCE:-052OK+DISC:00000000:00000000000000000000000000000000:0000000000:B9782E08068C:-071OK+DISCE
In this example, the HM-10 is detecting my RadBeacon which has UUID of 2G234454...with signal strength of -052. It is also detecting another BLE beacon (my AppleTV downstairs) with UUID of B9782E08068C with signal strength of -071.
I'm definitely not very knowledgable about any of this stuff, but it seems to be working for me so far. Next challenge for me will be to figure out how to parse the text data being received. I'm mostly interested in the distance/signal strength data in order to trigger an action when the RadBeacon gets very close to the HM-10.
[Full disclosure: I jumbled some of the UUID numbers above since I'm not sure if any of this information is private or hackable or whatever]
[By the way, the nRF8001 BLE Shield will not do this since it only runs in peripheral mode.]
Yes, you can get the Min and Max number of the nearby iBeacons.
You need to Attach hm-10 to Arduino Uno.
Try using this Library : https://github.com/dinosd/BLE_PROXIMITY
You can configure suitable AT commands if you want to configure it. But it should work with default settings as well.
Use SoftwareSerial to access HM-10.
In firmware version V539 of the HM-10, it adds an AT command to list nearby iBeacons. The command is AT+DISI?. You would simply need to set up the Arduion to send that command over a serial port and parse the data it returns.

How to send/receive serial communication

How can I send a string via serial communications from Java or Python? I have a very little arduino program that will recieve a CSV string of ints that each control different relays (I adapted it from their example).
I just got an Arduino, and I am trying to use it to open and close a relay remotely. I have it opening and closing the relay, no problem. But I really have no idea where to start as far as using serial communication.
I have a bluetooth dongle that I can connect to, but once I do that I'm lost.
Also, this is my first time using serial communications AND my first time using an Arduino. So I'm sorry if I am completely off on some of the things I am asking. All I know is what I've learned from Google.
Thank you very much
You can use any Java or Python serial port classes and methods. There is however one thing you need to be aware of.
The newer arduino's have a feature known as AutoReset. This works by connecting the DTR signal from the serial port to the Reset line on the chip using a capacitor or such. The IDE uses this to reset the board to activate the bootloader and initiate uploading code to the arduino. The serial monitor in the IDE is aware of this and does not toggle the DTR line when comunicating with the device (except when it initially connects).
There is are several ways to defeat this feature and you can read about them here.
As for actually comunicating with the device, there are several tutorials about serial communication in both Java and Python.
Pyserial includes the option to not use the DTR lines when opening a port.
Here is a website explaining how to use RXTX (a Java library) to comunicate with an Arduino
Best of luck.

Resources