ping and teensy (WIZ820io)

Status
Not open for further replies.

Electrumpetplayer

Active member
Dear all,

I make use of an adhoc ethernet network: macbook pro connected to teensy with WIZ820io shield (connected alternatively on pin 2 and 6 for Slave Select and Reset).

The connection (through internet sharing on the MACbook) is not always working and when on stage I want to be able to diagnose the problem very quickly.

So for diagnostic reasons I want to be able to ping the macbook from the teensy to see if the network is existent (that will be reflected in a LED signal on the teensy). There is an arduino library (ICMPPing) that should do the trick but it conflicts with the SPI and ethernet libraries from the teensy (see error code below). The error code comes from when I compile the example "ping" sketch from that library for teensy3.1. There is no error when coding for arduino uno for example. The library is written by Blake Foster and can be found here on Github.

Does anyone have experience with this library on teensy and what to change to make it work?
Or else does anyone have an advice on an alternative?

Thanks in advance, Hans.




Arduino: 1.6.5 (Mac OS X), TD: 1.24, Board:"Teensy 3.1, Serial, 96 MHz optimized (overclock), US English"

Build-opties gewijzigd, alles wordt opnieuw gebuild
In file included from Ping.ino:17:0:
/Users/hansleeuwoud/Documents/Arduino/libraries/icmp_ping/ICMPPing.h:21:23: error: conflicting declaration 'typedef long unsigned int time_t'
typedef unsigned long time_t;
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/stdio.h:47:0,
from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/Print.h:35,
from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/Stream.h:24,
from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/HardwareSerial.h:163,
from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/WProgram.h:16,
from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/Arduino.h:1,
from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI/SPI.h:16,
from Ping.ino:15:
/Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/sys/types.h:122:18: error: 'time_t' has a previous declaration as 'typedef long int time_t'
typedef _TIME_T_ time_t;
^
In file included from Ping.ino:17:0:
/Users/hansleeuwoud/Documents/Arduino/libraries/icmp_ping/ICMPPing.h:37:1: warning: 'typedef' was ignored in this declaration [enabled by default]
};
 
Status
Not open for further replies.
Back
Top