FTDI + ESP8266 [Need to use AT Commands] without Arduino - arduino

I am trying to write standalone ESP8266 code so that it can communicate to wifi and change its states. For this, what I want to do is to send some command "AT+CWMODE=1" or "AT+CWMODE=3" to ESP8266 via code and toggle them on push button tap.
So, like in Arduino there is a Serial.write which writes on a serial monitor via SoftwareSerial class.
But when I am sending Serial.write("AT+CWMODE=1") it prints on the monitor as a string rather than changing the wifi state.
Is there a way to send AT commands without using Arduino chip software serial pins?
Thanks.

Sorted out the issue. All those who are new like me to ESP world, I did the serial.write "AT" commands using wifi classes of Esp8266.
You need to connect the board as ESP8266 Generic Module and send/receive data using ESP8266Wifi class, by reading the scanned networks, changing mode, using Serial.read on the connected devices on Access point of Esp8266.
Let me know if someone need help on this future, I will be happy to help.

Related

USB connection to move a Servo Motor

I want to know how to connect a phone to an arduino via usb and then have a servo motor move once the arduino recognizes that it is a phone. I'm very very new to arduino but I think it is an arduino uno.
We haven't tried anything yet because we don't know if out school has the proper hardware. Any guidance would be greatly appreciated.
There isn't a way for the Arduino to just "know" what it's connected to. The USB connection is handled with the USB to TTL converter on the board and thats what the computer sees. The rest of the Arduino board is simply rxing or txing serial data if there is any and there wont be unless you send something. You would have to send some serial data from the phone using an app to identify the phone.
If you give more detail, then maybe we can figure out some other way to solve the problem.

Communicate puredata with Arduino over Serial. Unable to connect to the same port for stablishing communication

As the title indicates, I need to create a bridge betweeen pd and arduino UNO but I can't get it to work.
I need to start an arduino process after receiving a message from my computer through puredata, using the comport object.
Since comport object in pd doesn't allow me to connect to the port used by arduino (listed trough "devices" message in pd) I don't understand how to stablish a communication between them.
[comport]: could not open device COM3:
failure(5) ERROR_ACCESS_DENIED
Arduino is connected to the computer by usb cable.
If been able to sort it out using in arduino.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(0, 1);
And then referring to the serial with the variable used, mySerial, in this case.
Since this moment, when I was trying to do it using a basic included Serial communication, without library, I was not able to find the needed port free in puredata. Now it seems to work well, I cannot figure it out why not before.

Xbee and Arduino acting strangely regardless of code

I'm trying to write a simple code that sends a string to an xbee and one that sends the string back, I was able to do this with XCTU via console, but I want my arduino to send the string.
I was able to use a simple code that read my output from the serial monitor and sends it to an xbee connected via usb adapter, the problem is that I now wrote the code so it sends a predefined string like in the screenshot, but when I write into the monitor it still sends whatever I wrote instead of the static string. I'm also unable to read what I type into the xbee console from XCTU.
I'd love any assistance in this, I've tried uploading and resetting everything to no avail.
Screenshot of problem with the current code of the arduino on the left
You said you were using an Arduino to try to communicate with your XBee Zigbee module.
One thing you have to check is the connection between the TX and RX signals on the Arduino side and on the XBee Zigbee side.
I've helped someone on another forum who used this Seed Studio XBee shield :
If you look at the schematics of this shield, the XBee 'DOut' signal (Tx) is wired to the XB_TX line which can be connected to any of the AJ2 pin with a jumper.
Now on the Arduino side :
On this extract of the Arduino schematics, we can see that the ATMEGA UART has it's RX signal connected to pin 2 of the CPU which is wired to the IOL (AJ2) pin 0.
So, that means that on this shield, the jumper have to be placed between XB_TX and pin 0 of AJ2 to connect the XBee transmission signal (output) to the ATMEGA reception signal (input) [and also XB_RX have to be connected pin 1 of AJ2].
As you didn't mention what kind of shield you were using, you have to double check this point which is a common issue when using serial communication.
In a general way, ALWAYS connect 1 output to N input (except open-drain or open-collector outputs which can be connected together to make a wired OR but which finally have to be connected to N inputs)
Hope this helps
Best regards
From what I can tell on the documentation Xbee "hijacks" the serial system. Instead try blinking an LED to confirm data is being received and sent.
documentation

Arduino multiple serial/hid output

Hello has anyone found a way to use an Arduino as a serial device and hid device at the same time?
I thought of a few solutions but didn't know the best way to go about it.
my goal is I need a serial device so the computer can send info to the Arduino but I also need an hid device.
can I use them both though 1 USB port? probably not
or
can I rig up another usb or serial port on the Arduino and use that as hid?
or
should I connect the Arduino to a teensy and use that for hid?
Thank you just trying to find the safest solution I'm making a custom fixture for my little laser engraver.
I recommend getting an Arduino Leonardo, Arduino Micro, an A-Star 32U4, or any other Arduino-compatible ATmega32U4 board. These devices act as a USB serial port but they can also be an HID at the same time if you use the Keyboard or Mouse libraries that comes with the Arduino IDE.

Arduino Yun WifiStatus Example Failing

I am able to connect and upload the WifiStatus example per the instructions on the Arduino Site/Examples/Yun. However, when I hit the serial monitor button it is supposed to print out the relevant Wifi stats, instead it says "unable to connect" and the final line goes a bit further..."unable to connect: is the sketch using the bridge". Any ideas? A post suggested reseting the 32U4, which I did, but no luck.
Incidently, all of this is over Wifi. Board and port are set per instructions. Yun pings fine and receives the uploaded sketch fine.
More code is usually more illuminating... so you might get better answers when you provide more information.
"is the sketch using the bridge" seems to indicate that there is some problem with the Bridge library. Is it being initialized? Did initialization (i.e., "Bridge.begin()" succeed?
A sketch with bridge functional and serial monitor via network connection cannot be running simultaneously as they use the same hardware connection.
You may use the serial monitor via USB port, or Serial TX/RX pins, or SoftwareSerial for this.

Resources