i enter 1 and hit send but nothing happens, on the Arduino IDE itself, it accepts my character and give a 'HIGH' signal which you can measure with a metre.
I am new to atmel studio and cannot figure out how to make the serial monitor interact with the arduino using ATMEL STUDIO 7.
Can anyone who has encountered and solved this help?
Picture attached
You need to post your program so we can see what you can see.
And please use the code button </>so your code looks like thisand is easy to copy to a text editor
...R
[
const int outPin = 3;
void setup ()
{
pinMode (outPin, OUTPUT);
Serial.begin (115200);
Serial.println ("Enter 1 or 0");
}
void loop ()
{
if (Serial.available () > 0
{
char ch = Serial.read ();
if (ch == '1')
{
digitalWrite (outPin, HIGH);
}
else if (ch == '0')
{
digitalWrite (outPut, LOW);
}
}
}
]
sixqub:
i enter 1 and hit send but nothing happens, on the Arduino IDE itself, it accepts my character and give a 'HIGH' signal which you can measure with a metre.
The pin goes HIGH, so what more do you expect?
If you want something to print out on the Serial Monitor, you have to write the code to to it.
And read the instructions! ![]()
ieee488:
The pin goes HIGH, so what more do you expect?If you want something to print out on the Serial Monitor, you have to write the code to to it.
[You have missed my point. I do not have any problesm using the arduino IDE itself. writing this same code in atmel studio 7 and trying to use the serial monitor, is where the problem is, the serial monitor will not take in the '1' or '0'! Thats why i attached the picture.]
Is the serial monitor that you're talking about the one that comes with the Arduino IDE?
If so, maybe there is a conflict between the Atmel Studio an the serial monitor. Try a normal tetminal program.
Paul__B:
And read the instructions![Thank you for your contribution?! (Y)]
[Thank you for your contribution?! (Y)]
But you still haven't read them have you?
Or if you have then they were too complex for you to follow. It is not too late you can still correct those posts with the edit function.
Grumpy_Mike:
[But you still haven't read them have you?
Or if you have then they were too complex for you to follow. It is not too late you can still correct those posts with the edit function.]dont you just have the best job!
dont you just have the best job!
No not when it comes to people like you who disrespect this forum and are not even smart enough to work the quote icon.
If you use the usb port on the arduino, try 9600 baud.
sixqub:
dont you just have the best job!
Rather than complain why not take some time to look at other Threads on the Forum and learn how other people get help with their project.
The compiler will expect you to write a program that follow rules very precisely.
...R
[If you use the usb port on the arduino, try 9600 baud].
Thanks, someone that works with Atmel studio has repeated the same thing and is finding out why.
- it works as expected on arduino's IDE
- doesn't work in Atmel studios(just serial monitor communication). I have visual studio 2015 and it's the same story.
- I have tried the baud rate switching, didn't solve it.
- the only reason I tried Atmel was because visual studio had the problem too.
5)I don't care to use a 3rd party terminal, if that's the case I will just use the adruino's IDE for arduino stuff alone.
Thank you any ways
5)I don't care to use a 3rd party terminal, if that's the case I will just use the adruino's IDE for arduino stuff alone.
![]()
There are advantages and disadvantages. With the IDE/SerialMonitor you don't have to worry about closing the terminal application when uploading. With a 3rd party terminal, you might be able to send the number 1234 instead of the text 1234, you can easily capture to file etc.
I use both depending on needs.
Serial monitor can be the one provided by the Arduino IDE but can just as well be any device that uses a 2 wire rs-232 communication port typically 8 bit no parity and one stop bit as long as you have a transmit, a receive and a ground. The level on the pins is lower than the standard RS-232 but most of today products will accept the lower levels. I have found that only 9600 baud works with the IDE serial monitor.
Nasa:
The level on the pins is lower than the standard RS-232 but most of today products will accept the lower levels.
It's not only lower voltages. It's also inverted. You need a level converter to connect RS232 to a TTL-level UART. But most people don't have to worry about that because RS232 is relatively uncommon these days and USB-to-serial adapters are the norm.
