Can't get serial output while using Ethernet - serial-port

I started to experimenting with the Arduino Ethernet shield and got it working with not much effort. However, when I try to debug through the hardware serial port of the board, I get nothing, and though the program still runs, and I know it should be giving me something, it doesn't. Truth be told, I haven't got a clue of what's going on. How do I fix this problem?
P.S. I am using one of the example sketches included in the Arduino IDE.

The Ethernet shield does not use the RX and TX pins (0,1) and I have personally used Serial communication with the shield before.
So it definitely had to do with your code. Can you post your code?
Also have you connected anything to digital pins 0 and 1?

The Arduino Ethernet board is not equivalent to Arduino Uno + Etherent shield. In the Arduino Ethernet board the USB-to-serial chip is not present.
From the official Arduino Ethernet board page
The Ethernet differs from other boards in that it does not have an
onboard USB-to-serial driver chip, but has a Wiznet Ethernet
interface.
So I don't think you can print any values in the serial monitor.
Update:
You need an external FTDI adapter like http://arduino.cc/en/Main/USBSerial get the serial communication between Arduino and your computer to work.

Related

Sony Spresense + Arduino: connect a W5500 based Ethernet if

I try to use the Spresense board to build a NTP server.
Ethernet should be done with W5500 chip connected over SPI. Seems that the Arduino Ethernet library got a problem with the Apresense SPI library.
Someone out there who tried this already and have some ideas on it?
Code from Ethernet DhcpAddressPrinter example compiles just fine after changing Arduino/libraries/Ethernet/src/EthernetClient.cpp in Line 51
if (ip == IPAddress((uint32_t)0) || ip == IPAddress(0xFFFFFFFFul)) return 0;
I always get the message from the serial terminal that "Ethernet shield was not found". The W5500 PCB should not be the problem as it works on a normal Arduino Uno just fine. (It is not the original Arduino Ethernet shield, as this shield uses the ICSP header which is not present on Spresense board)
The Arduino IDE is 1.8.8
Hardware Problem solved: The W5500 and Spresense want the I/O level jumper on the board set to 3.3V. Ethernet lib seems to work now, at least on the SPI.
I´m looking forward to work on the software now.

SIM900 module not responding on hardware COM port

I've got my sim900 module working with arduino by using their software serial library, however, I want to eliminate arduino from the equation and have serial communication directly to sim900 module.
I'm using putty as my terminal emulator. It's serial is configured to COM1 19200 8 N 1 the same as device manager configuration for this port.
I connect straight from hardware serial on my PCs motherboard into serial-to-ttl interface board which connects to sim900 module. The board has 4 pins - VCC GND TX RX. They're all connected to my sim900 hardware serial as follows: VCC=5V GND=GND TX=TX RX=RX (Yes I know that it's always actually TX=RX and RX=TX, but when I connect it that way my interface board doesn't blink any led to indicate a transfer whereas it does when I connect TX=TX and RX=RX). The switch on the module is set to hardware serial pins as well.
So the only thing that happens when I send AT commands such as AT or ATI and press enter is that puttys cursor comes back to the beginning of command that I typed. No response.
I'm thinking that I'm not doing something that the arduinos software serial port is doing when it sends commands to sim900.
Can anyone help please ? It's literally been days of trying different configurations with no results.
In that time besides getting sim900 working with arduino software serial I verified that the hardware serial port on my motherboard is working correctly and the interface board is working correctly as well.

Is it possible to use Arduino 2560's serial/USB communication without Arduino bootloader?

I have an Arduino 2560 and would like to send serial data to my PC. However, I am currently not using the Arduino Bootloader because I wanted to use a program that I wrote for an Atmega644 before (as far as I understood, one has to use the Arduino language when using the Bootloader?).
Does anyone know if what I am trying to do is possible with reasonable effort?
Connection to PC via 2560's serial0 does not depend on bootloader (if you plan connection when main program is running). You need 16u2 running to bridge 5V serial UART to USB or you can of course use any other option (e.g. MAX232 or so) to convert 5V UART to USB or RS232. But in case of RS232 double check baud rate error because of 16MHz crystal for particular baudrate.
2560 bootloader just implements firmware flash.

What happen when use rs232 instead of usb in arduino?

I just start a project which is very basic actually. But I need an information. It is about arduino serial communication. Here is the question.
If I connect arduino to computer using TTL to RS232 converter without USB cable then can I still use serial monitor to get some data or what happens ? Assume arduino is programmed before using usb cable, and it is powered externally when usb is not used.
for instance the code just
Serial.println("It is working");
delay(1000);
Thansk a lot.
you will fry it. Standard RS232 use a +-12V level, while arduino use TTL level (0-5V), so you still need a RS232 -> RS232TTL converter. If you use it, then using virtual serial over USB or real hardware serial is exactly the same, except that hardware serial port never appear/disappear when you plug in the arduino (there is not something like plug'n'play in rs232, it is always plugged)

connect arduino to arduino mega adk by USB

I have an arduino mega ADK, with usb port, and an arduino uno.
- On the arduino uno, I put a xBee shield with the wifly module for connect to the internet.
- On the arduino mega ADK, I put the TinkerKit! shield.
I need to use both : xBee shield and TinkerKit!. and the single way i found, is to connect the arduino uno to the arduino mega ADK by USB wire (the wire is the one I use to connect an arduino to my computer).
Do you think it could work ? If yes, How can I get what is writting on the outpu of the arduino uno ? If no, is there an other way to do what I need ?
yes, it can be done, but is is way more easier to use directly the Hardware/Software Serial. Even if you get iw work, it will be a serial simulation over usb..
So using USB is just a layer of complexity that can break, and nothing more.

Resources