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.
Related
I have designed a ledstrip driver capable of receiving commands over UDP-IP. I initially worked with an Arduino MEGA, and currently I'm in the process of deploying the code in an Arduino NANO.
The Arduino NANO only has one hardware serial interface, unlike the MEGA, which has several. This forces me to disable the usual debugging through one of the Serial ports (by sending strings to the computer) and to reserve the one and only serial interface for the ESP8266. In short, I am connecting the ESP8266 to the TX and RX pins in the NANO.
I am aware that I could use the softwareserial.h library, but I'd like to avoid it if possible.
The following function sets up the Wifi object:
void wifi_setup(){
// Initialize serial for ESP module
Serial.begin(9600);
// Initialize ESP module
WiFi.init(&Serial); /* GETS STUCK HERE */
...
}
The problem is: the microcontroller gets stuck in the Wifi.init() function and never abandons it.
I am aware that the serial interface is connected to the USB port, and am suspicious this might be a problem. However, I have tried giving power to the NANO through the VIN pin instead of through the USB port, and it hasn't worked.
What am I doing wrong?
The best solution will be to write separate code for ESP8266 and Arduino Nano - or even only for ESP8266 (NodeMCU to make it easy). It will be much easier. But if you really want to do it in your way, i think ESP uses 115200 baud, and you've set it to 9600.
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.
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.
I'm using the Official Wifi shield on a Uno R3.
Everything was working fine in the beginning.
But now, the Uno couldn't communicate with the WiFi shield whether it's plug in with USB or with a 9V battery. I could still control the L9 LED on the Wifi shield, but the WiFi function isn't working anymore. I'm returned a
WL_Connected = False, when I did WiFi.begin(ssid, pass);
I did notice, even when it was working, when I switched the the 9V battery from laptop power, it doesn't always power up immediately.
How do I even begin to trouble shoot this?
Swapping out boards/shields. It could be something simple like a bad pin.
The WiFi shield was based on a transceiver made by ZeroG. Now this company was bought from Microchip and of course they don't support Atmel processors anymore.
I had the same problem and I switched to another amazing product: Flyport Wi-Fi that has a processor onboard (PIC24) and this transceiver. It's also open source, look to www.openpicus.com
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.