Serial Monitor Commands Arduino

0 views
Skip to first unread message

Saurabh Cloudas

unread,
Aug 3, 2024, 5:41:23 PM8/3/24
to googlimepoon

I'm using the Arduino Uno board with Quectel M10 GPRS shield. I want to send AT commands through the serial monitor. I load the following code and send AT commands through the serial monitor. I dont see the AT command sent or response received on the serial monitor output window. Any help is appreciated..

I suggest you add a Serial.println() call in setup() so you can confirm that the USB serial connection is working correctly. I don't see anything wrong with the code, so I suggest you double check the connections to the modem and the serial settings. Have you check that the pins used for mySerial are the correct way round wrt the wiring connections? How do you know that the modem is using 19200 bps? If there's any possibility that it's starting off at another speed, or with different serial settings, try changing the mySerial setup to see if you can get a response from it.

Hi, I have a problem with gprs modem.
I'm using gprs Maestro 100 evo. I have set this modem(AT command) using hyperterminal then the connection established (between modem and virtual serial port in PC) but when I am going to send data, PC can't read it.
these my program

I'm using a Sierra Wireless FXT009 to send AT Commands to the Arduino. I used m2msupport's code so that I can monitor whether the the arduino is receiving successfully. I have it connected using a Max232 to pins 2 and 3 (Software Serial Pins).

When I open the serial monitor all I see is garbage, unreadable symbols, but I can tell it's receiving the data because there is a 20 second gap between automatic acknowledgements from the modem. It's just that this data arrives unreadable. There's no problem when you connect the modem directly to the PC. I checked the baud rate and even changed the modem's baud rate to 9600, still didn't help.

Can anyone tell me how can I send sms to many numbers at once? im sending through java.. Can send to one number at once.. when I try to send many numbers. sms is going for just 2 or 3 numbers... how can I send many sms at once?

sham999:
Can anyone tell me how can I send sms to many numbers at once? im sending through java.. Can send to one number at once.. when I try to send many numbers. sms is going for just 2 or 3 numbers... how can I send many sms at once?

This doesn't seem related to the original question and I think you're hijacking the thread. If you have a new question, start your own thread. If you want help with a problem in your code, you will need to post the code which demonstrates the problem.

Connections that i did..
-> i've connected the Arduino Tx(pin 1) to Rx pin of the modem and Arduino Rx(pin 0) to Tx pin of the modem.
-> and i am using the USB cable to power up and i think i can use the same cable to watch the serial communication also..

-> i will use the Software serial to communicate with the Modem it is ok..
-> you are saying that use Arduino Tx and Rx pins to communicate with the pc it is confusing do i need to connect to these pins
or through USB interface can i use these with out connecting ????

Hi, i have problem with AT command, it do not have any reply after i follow the instruction above.... May i know what is the problem? After key in the command and click send, it do not have any response. Anyone can help? >

A serial port can only be opened by one program at a time. The way the Arduino IDE is able to upload with the Serial Monitor open is by closing the port connection to the Serial Monitor, doing the upload, then re-opening the port in the Serial Monitor. You would need to replicate this behavior in your script. I found this works:

Once again, you have solved my problem completely. I have taken your solution and incorporated it into a bash script that manages the arduino-cli compilation, uploading and serial monitor initiation for a sketch that I specify as an argument on the command line, e.g., run.sh mySketch

Although I have many years of c++ programming experience on MS Windows, I would only classify myself as an "experienced" beginner with Linux and Arduino. I was not familiar with the initiation of background processes in Linux and I think there will be many others with an experience level similar to mine who will appreciate your solution. Consequently, I have edited the subject heading on my original post to make it more "searchable" for arduino-cli users looking for a Serial Monitor capability.

Thanks for taking the time to post your findings and script. I'm sure this is is something other Arduino CLI users will be interested in. We've been spoiled by the Arduino IDE being able to automagically handle the Serial Monitor's serial connection because of it being an integrated part of the IDE.

Hello there. This is my first time asking for help on this forum. I will, therefore, be as specific as I can. I am working on a project that calls different functions through the serial monitor using a two letter input. I have done my research and can't for the life of me get something to work. I have tried to use the code from this website and have not been able to get something to work.

I am not sure what you mean by "line ending set in the serial monitor". If you mean have I ran this in the serial monitor then the answer is I have not. The system that this control is in a shop that I need to wait to get access to, I can at noon mountain time so in the next few hours.

The error I am getting is saying that " 'casting_forward' was not declared in the scope". I have gotten this error a million times and I keep forgetting what I did to correct it in other instances. I will try the code that UKHeliBob has posted here in just a few hours and see what's going on. I have a feeling I am just not using the "readStringUntil()" correctly. I will update you guys shortly.

Also, yes I have read the serial input basics post but still can't for the life of me understand this. I am very new to coding and basically have taught myself this by banging my head against the wall.

The Serial monitor into which you type the command has an option at the bottom of the screen to set the line ending character that will be sent when you press Return, which in this case needs to be Newline.

This is just the code snippet within the void loop. It can work with both commands "cff" and "cbf" but only one or the other and only once. How can I be able to input these commands multiple times within the serial monitor? eg. I enter cff once and it runs that once then i enter cbf and it runs cbf once but i can also just enter cff multiple times and it runs multiple times.

Isn't the newline option already selected in serial monitor? What I mean is that isn't newline the standard selection? I might be completely wrong. Thank you so much! I will have to check when I have access to the system tomorrow.

Programs such as screen, minicom or (my favorite)picocom are useful if you want bidirectional communicationbetween the Arduino and the host computer. If you only want to readwhat the Arduino sends, that can be done with cat:

I also had the problem that arduino-cli includes no serial monitor. I tried out screen, minicom and other but they are a bit difficult to get used with them. So I created a small python script which works as an serial monitor in the command line: -Monitor

I am a beginner to arduino and trying to follow one of the videos from youtube to make a project- Master And Slave using HC-05 modules. I followed every step from that video carefully. Here's the link to the video -> =BXXAcFOTnBoFor Slave Module when I type AT commands in the serial monitor nothing shows up.I searched in Internet for the this problem and still didn't fix it. Here's What i have done:

Your problem is not actually related to arduino in any way. This tutorial is utilizing onboard USB->UART transceiver IC. So in theory you could even remove Atmel chip from the board. Its more like using module like this FT232 converter. Anyways sorry if I confused you but you can research the subject.

I have an Arduino script to send commands to some sensitive hardware. I don't want to alter the Arduino's code very much because I didn't write it, but I want to be able to enter a sequence of commands without having to type them manually.

I want my python script's output to become the input into the Arduino serial monitor, and then to have the script send the command to the board. Is it possible to have python talk to the Arduino IDE in this way?

You just need to connect your Arduino board to your computer and send and receive data with a python script through a Serial port. I created a simple example and put an acknowledge to confirm the received command on Arduino, but remember to modify your code based on your needs:

The two circuits in this lesson use the same configurations as the previous two lessons on digital input with a pushbutton and analog input with a potentiometer. The only differences are that these circuits are free-wired (no breadboard) and do not have an external LED wired up. Oh, and they are running code to generate serial messages, which we'll learn about in this lesson.

You can follow along virtually using Tinkercad Circuits. You can even view this lesson from within Tinkercad (free login required)! Explore the sample circuit and build your own right next to it. Tinkercad Circuits is a free browser-based program that lets you build and simulate circuits. It's perfect for learning, teaching, and prototyping.

Let's use the code blocks editor to listen to an Arduino input pin, then print out the value (analog) or state (digital) of the input in the Serial Monitor window. Click the "Code" button to open the code panel.

Click "Start Simulation" to run the sample Arduino code, and observe the numbers in the Serial Monitor as you interact with the potentiometer. You can click back and forth between the two Arduinos while the simulation is running in Tinkercad Circuits, but only the analog circuit will display in the embedded module above.

After duplicating the sample circuit into your Tinkercad account, you can change the code. Navigate to the Output code category, then drag out a "print to serial monitor" block and place it just before the serial block that's already in the program.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages