Show Posts
|
|
Pages: [1] 2 3 ... 6
|
|
2
|
International / Français / Re: Problème avec le code de NetIO
|
on: October 01, 2012, 10:24:56 am
|
Voilà (pour commencer) : NetIOServer:19: error: no matching function for call to 'Server::Server(int)'
Depuis Arduino 1.0, la classe Server de la bibliothèque Ethernet a été renommée en EthernetServer.
C:\arduino-1.0.1\hardware\arduino\cores\arduino/Server.h:4: note: candidates are: Server::Server() C:\arduino-1.0.1\hardware\arduino\cores\arduino/Server.h:4: note: Server::Server(const Server&) NetIOServer:19: error: cannot declare variable 'iPhoneServer' to be of abstract type 'Server' C:\arduino-1.0.1\hardware\arduino\cores\arduino/Server.h:4: note: because the following virtual functions are pure within 'Server': C:\arduino-1.0.1\hardware\arduino\cores\arduino/Print.h:48: note: virtual size_t Print::write(uint8_t) C:\arduino-1.0.1\hardware\arduino\cores\arduino/Server.h:6: note: virtual void Server::begin() NetIOServer.cpp: In function 'void setup()': NetIOServer:33: error: 'EthernetDHCP' was not declared in this scope NetIOServer.cpp: In function 'void loop()': NetIOServer:63: error: 'EthernetDHCP' was not declared in this scope NetIOServer.cpp: In function 'void iPhoneInterface()': NetIOServer:76: error: 'class Server' has no member named 'available' NetIOServer:76: error: cannot declare variable 'client' to be of abstract type 'Client' C:\arduino-1.0.1\hardware\arduino\cores\arduino/Client.h:7: note: because the following virtual functions are pure within 'Client': C:\arduino-1.0.1\hardware\arduino\cores\arduino/Client.h:12: note: virtual size_t Client::write(uint8_t) C:\arduino-1.0.1\hardware\arduino\cores\arduino/Client.h:13: note: virtual size_t Client::write(const uint8_t*, size_t) C:\arduino-1.0.1\hardware\arduino\cores\arduino/Client.h:14: note: virtual int Client::available() C:\arduino-1.0.1\hardware\arduino\cores\arduino/Client.h:15: note: virtual int Client::read() C:\arduino-1.0.1\hardware\arduino\cores\arduino/Client.h:17: note: virtual int Client::peek() C:\arduino-1.0.1\hardware\arduino\cores\arduino/Client.h:18: note: virtual void Client::flush() C:\arduino-1.0.1\hardware\arduino\cores\arduino/Client.h:10: note: virtual int Client::connect(IPAddress, uint16_t) C:\arduino-1.0.1\hardware\arduino\cores\arduino/Client.h:11: note: virtual int Client::connect(const char*, uint16_t) C:\arduino-1.0.1\hardware\arduino\cores\arduino/Client.h:16: note: virtual int Client::read(uint8_t*, size_t) C:\arduino-1.0.1\hardware\arduino\cores\arduino/Client.h:19: note: virtual void Client::stop() C:\arduino-1.0.1\hardware\arduino\cores\arduino/Client.h:20: note: virtual uint8_t Client::connected() C:\arduino-1.0.1\hardware\arduino\cores\arduino/Client.h:21: note: virtual Client::operator bool()
J'ai bien essayé de renomer Ethernet en EthernetServer, mais cela me fait d'autres erreurs.
|
|
|
|
|
3
|
International / Français / Re: Problème avec le code de NetIO
|
on: October 01, 2012, 09:38:52 am
|
EEEeeuuuhhhh Android ou iOS ???!
Je suis sous Android, mais le code Arduino devrais fonctionner avec les deux, puisqu'il ce contente de recevoir des commandes du smartphone. Mais le code Arduino est ancien (version 022) alors que la version actuelle est 1.0.1.
|
|
|
|
|
5
|
International / Français / Problème avec le code de NetIO
|
on: October 01, 2012, 05:32:02 am
|
Salut à tous. J'ai quelques soucis avec un code que j'ai trouvé sur le web. Il sert à faire fontionner NetIO sous Android : https://play.google.com/store/apps/details?id=com.luvago.netioSite web : http://netio.davideickhoff.de/Afin d'un faire facilement une télécommande. Mais j'ai des erreurs dans le code fournis. Qui comme on peut le voir dans le code, est prévus pour la version 0022. Et qui comporte une librairie externe à télécharger. /*
IDE Version 0022 Arduino Uno Arduino Ethernet Shield with Wiznet W5100 Ethernet chip */
// include library #include <SPI.h> #include <Ethernet.h> #include <EthernetDHCP.h> // library from http://gkaindl.com/software/arduino-ethernet/dhcp // end include library #define DEBUG 1 //global variable byte mac[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA }; // mac address of Ethernet shield //----- iPhone Remote -------
#define BUFSIZ 64 Server iPhoneServer(2560); // server port number of Ethernet shield
//---------------------------
// setup void setup(){ Serial.begin(115200); //for debug
if (DEBUG) Serial.println("Attempting to obtain a DHCP lease..."); EthernetDHCP.begin(mac);
if (DEBUG) { const byte* ipAddr = EthernetDHCP.ipAddress(); const byte* gatewayAddr = EthernetDHCP.gatewayIpAddress(); const byte* dnsAddr = EthernetDHCP.dnsIpAddress();
Serial.println("A DHCP lease has been obtained.");
Serial.print("My IP address is "); Serial.println(ip_to_str(ipAddr));
Serial.print("Gateway IP address is "); Serial.println(ip_to_str(gatewayAddr));
Serial.print("DNS IP address is "); Serial.println(ip_to_str(dnsAddr)); }
iPhoneServer.begin(); // start the server
} // end setup
// main loop void loop() { EthernetDHCP.maintain(); // Call this once per loop(). iPhoneInterface();
} // end main loop
void iPhoneInterface() {
int index = 0; char Remote[BUFSIZ];
Client client = iPhoneServer.available(); if (client) { if (client.connected()) { while (client.available()) { char c = client.read(); //Serial.print(c); // print to the screen if (c != '\n' && c != '\r') { // no linefeed or CR so keep reading Remote[index] = c; index++; if (index >= BUFSIZ) index = BUFSIZ -1; continue; }
Remote[index] = 0;
}
Serial.println(Remote); // print string sent from iPhone
if (strstr(Remote, "Local")) { // initialsend client.println("OK");
}
if (strstr(Remote, "X10")) { // is it an X10 command client.println("OK"); }
if (strstr(Remote, "FireLights")) { // set the slider to 0 client.println("0");
}
if (strstr(Remote, "Fire lights")) { // is it a slider value client.println("OK");
}
if (strstr(Remote, "DoorLights")) { // set the slider to 0 client.println("0");
}
if (strstr(Remote, "Door lights")) { // is it a slider value client.println("OK");
}
} //----- End of if client.connected } //------- End of if client } //--------- End of iPhoneInterface()
//---------- Just a utility function to nicely format an IP address. ------------ const char* ip_to_str(const uint8_t* ipAddr) { static char buf[16]; sprintf(buf, "%d.%d.%d.%d\0", ipAddr[0], ipAddr[1], ipAddr[2], ipAddr[3]); return buf; }
Merci d'avance pour aide.
|
|
|
|
|
6
|
International / Le bar / Re: ici on peut se lâcher....
|
on: June 18, 2012, 04:19:09 am
|
J'ai une info qui peut intéresser nos amis Suisses (et les autres). Si comme moi vous en avez raz-le-bol des casses-c... qui appels pour vous vendre n'importe quoi et vous font perdre du temps, j'ai trouvé la parade. En effet, une société surtout dont je ne sais plus le nom appelais sans cesses depuis plusieurs mois. Rien n'y a fait, ni le courtoisie, ni la demande de radiation, ni les injures, ni les menaces de procès ou de mort  J'ai beau avoir l'étoile dans le bottin qui dit que je veux pas de publicités. Bref, coté Swisscom non plus, ils peuvent rien faire. J'ai trouvé chez Interdiscount un téléphone fixe (89.90 CHF) qui permet de filtrer des numéros. Il est simple d'utilisation, comme cela ma femme peut aussi l'utiliser. C'est le Panasonic KX-TG8611. http://www.panasonic.ch/html/fr_CH/Produits/T%C3%A9l%C3%A9phones+et+fax/T%C3%A9l%C3%A9phones+DECT/KX-TG8611/Pr%C3%A9sentation/9114490/index.htmlQuand un numéro filtré appel, ça ne sonne pas et l'interlocuteur à systématiquement une tonalité occupée. Ca vas les occuper un moment  J'aurais bien pris un des nouveau téléphone fixe Android pour faire du filtrage, mais c'est compliqué (pour ma femme), plus cher et plus dure à trouver (et puis pas forcément encore très au point).
|
|
|
|
|
10
|
International / Français / Problème de compatibilité entre ethernet shield et LCD avec pad ?
|
on: June 08, 2012, 04:16:49 am
|
Bonjour à tous. J'ai un problème. Quand je j'empile Arduino Mega ADK 2560 avec Ethernet shield, j'arrive sans problèmes à envoyer des infos via http. Le module ethernet fonctionne nickel. Le ping répond. Quand je met en plus par dessus cet affichage LCD 2 lignes avec pad :   J'arrive plus du tout à avoir une connexion avec la carte ethernet. Même le ping ne revois rien. J'imagine que c'est parce que le LCD utilise un ou plusieurs port identique à ceux que le ethernet shield utilise !? Si oui, je peux faire comment pour empiler un ethernet et un lcd ?
|
|
|
|
|
12
|
International / Français / Re: Client - Serveur - Interpréteur de requêtes
|
on: June 05, 2012, 11:53:02 pm
|
|
Bon, alors personne n'a une idée ?
La seul modification que je fais par rapport à son code qui semble fonctionner dans la vidéo, c'est de mettre Ethernet devant Client, car sinon, ça compile pas. Mais c'est quand même pas cela qui pose problème ? Lui dans la vidéo il a bien quelque chose d'affiché dans le browser.
Une autre piste, c'est que des librairies sont déclarées. Dont une qui n'est autre que Ethernet.h qui est sans doute à l'origine des modifications du code d'origine. Peut-être que quelque chose à changé dans une de ces librairies.
Puisque le code n'a pas l'air d'être tout frais et qu'il n'a visiblement pas été revus depuis.
Merci.
|
|
|
|
|
13
|
International / Français / Re: Client - Serveur - Interpréteur de requêtes
|
on: June 05, 2012, 02:40:14 am
|
Merci à tous. Skizoh, ton exemple est un peut trop complexe pour ce que je veux faire. Et puis c'est pas très commenté, du coups, pas facile pour moi de m'y retrouver. Mais merci, très intéressant et instructif. Skywodd, merci aussi, mais ce que je cherche ressemble plus.. A quelque chose comme cela : http://g33k.blogspot.ch/2010/09/arduino-data-webserver-sample-web.htmlJ'ai effectuer les modifications que je poste en commentaire. J'ai aussi juste changé l'adresse MAC et IP. Je joins mon fichier. Ca fonctionne, enfin pas totalement. J'arrive à changer l'état d'une sortie (digital No  à 1 et 0. J'ai le "log" du port COM qui marche bien et qui m'indique bien tout ce que je fais. Mais par contre, la partie affichage de la page HTML dans le browser ne marche comme sur la vidéo de démonstration. J'ai une erreur 324 (Pas de données reçues). Et pourtant le code confirme bien que je devrais voir un truc du genre "D8 is ON".
|
|
|
|
|