hola no tengo conocimientos de esto, pero vi tan fácil esta aplicación de amanager para iphone pues compre todo lo necesario
resulta que el generador de código que me he creado de 2 pulsadores y dos interruptores
no me funciona a ver si alguien me puede ayudar
que le falta a esta biblioteca?
#include <SPI.h>
#include <Ethernet.h>
#include <SD.h>
#include <IOSController.h>
/* Start your code (defines) /
/ End your code */
/*
*
- Initialize the Ethernet server library
*/
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
IPAddress ip(192,168,1,37);
IPAddress gateway(192,168,1,1);
IPAddress subnet(255,255,255,0);
EthernetServer server(7777);
/*
*
- Prototypes of IOSController's callbacks
*/
void doWork();
void doSync(char *variable);
void processIncomingMessages(char *variable, char *value);
void processOutgoingMessages();
void processAlarms(char *variable);
void deviceConnected();
void deviceDisconnected();
/*
*
- IOSController Library initialization
*/
IOSController iosController(&server,&doWork,&doSync,&processIncomingMessages,&processOutgoingMessages,&deviceConnected,&deviceDisconnected);
/******* Start Global Variable for Widgets *******/
boolean ;
/******* End Global Variable for Widgets *******/
void setup() {
Serial.begin(9600);
Ethernet.begin(mac, ip, subnet, gateway);
server.begin();
/* Start your code (setup) /
/ End your code */
}
void loop() {
iosController.loop(500);
}
/**
*
*
- This function is called periodically and its equivalent to the standard loop() function
*/
void doWork() {
/* Start your code (doWork) /
/ End your code */
}
/**
*
*
- This function is called when the ios device connects and needs to initialize the position of switches and knobs
*/
void doSync (char *variable) {
if(strcmp(variable,"")==0) {
switchSyncCallback();
}
if(strcmp(variable,"")==0) {
switchSyncCallback();
}
/* Start your code (doSync) /
/ End your code */
}
/**
*
*
- This function is called when a new message is received from the iOS device
*/
void processIncomingMessages(char *variable, char *value) {
if(strcmp(variable,"")==0) {
pushButtonCallback();
}
if(strcmp(variable,"")==0) {
pushButtonCallback();
}
if(strcmp(variable,"")==0) {
switchCallback(atoi(value));
}
if(strcmp(variable,"")==0) {
switchCallback(atoi(value));
}
/* Start your code (processIncomingMessages) /
/ End your code */
}
/**
*
*
- This function is called periodically and messages can be sent to the iOS device
*/
void processOutgoingMessages() {
iosController.writeMessage("",);
/* Start your code (processOutgoingMessages) /
/ End your code */
}
void deviceConnected () {
/* Start your code (deviceConnected) /
/ End your code */
}
void deviceDisconnected () {
/* Start your code (deviceDisconnected) /
/ End your code */
}
/* Widgets synchronization callbacks */
void switchSyncCallback() {
iosController.writeMessage("",);
/* Start your code (switchSyncCallback) */
//iosController.writeMessage("",Insert value here);
/* End your code */
}
void switchSyncCallback() {
/* Start your code (switchSyncCallback) */
//iosController.writeMessage("",Insert value here);
/* End your code */
}
/* Widgets operations callbacks */
void pushButtonCallback(void) {
/* Start your code (pushButtonCallback) /
/ End your code */
}
void pushButtonCallback(void) {
/* Start your code (pushButtonCallback) /
/ End your code */
}
void switchCallback(boolean on) {
= on
/* Start your code (switchCallback) /
/ End your code */
}
void switchCallback(boolean on) {
/* Start your code (switchCallback) /
/ End your code */
}
/**** User Functions *****/
/* Start your code (User Functions) /
/ End your code */