raivisr / AS3935-Arduino-Library

AS3935 Franklin Lightning Sensorâ„¢ IC by AMS Arduino library
44 stars 40 forks source link

Impossible to use ethernet functions #1

Closed lasdou closed 11 years ago

lasdou commented 11 years ago

Hi,

thank you for developping this library. I have successfully connect the tautic AS3935 mini board to the arduino with it.

But when i want to use ethernet functions with an Ethernet board, i met some issues, like the impossbility to send requests to a server.

the ethernetClient.connect(server, port) method doesn't works.

I think it is because there is something common between your library an Ethernet Library. But i don't know what.

Can you help me please ?

Thank you very much.

Best regards

raivisr commented 11 years ago

All the communications can be configured from user sketch, please look at the example and comments right above AS3935 object instantiation. While I update README with AS3935 object constructor details, here are the arguments: first argument - pointer to a function that provides SPI transfer, it has to have following footprint - byte FunctionName(byte) second argument - pin to be used for chip select third argument - pin that is connected to AS3935 interrupt

Andrew Back has written nice blog on AS3935 and Arduino and he uses Arduino Ethernet on which pin 10 (aliased as SS) is used by Ethernet, so he moved chip select to pin 9 - http://www.designspark.com/blog/detecting-lightning-with-an-arduino

Short answer - no there can be nothing common between Ethernet code and this code since all communications are defined from user sketch.

lasdou commented 11 years ago

Thank you very much for your very quick response.

I will redo some tests tonight.

Sorry for my miscomprehension. :-)

Regards