Hello,
I have a sketch that I wrote for a Uno with an ethernet shield that uses a standalone router to communicate with an ipad/iphone. It works well.
The ipad accesses the ip address of the ethernet shield (host) and exchanges commands using the Z_OSC library. I use an OSC interpreter app on my ipad to send and receive information to control various bits of hardware connected to the arduino uno or mega.
I think I should be able to do this with a YUN. Is there anything I need to do to get the Linux part of the YUN to route commands from the ipad to the arduino (and vice verse).
In my Uno sketch, I simply need to input the correct Mac address and suitable IP address for the ethernet shield and the IP address of the ipad. I use the external wireless router which is connected by cable to the ethernet shield to communicate between the ipad and ethernet shield.
For example, the following information is necessary in the sketch:
byte myMac[] = { 0x90, 0xA2, 0xDA, 0x00, 0x89, 0x46 }; // Mac address of the Arduino ethernet shield
byte myIp[] = { 192,168,1,103 }; // IP address of the ethernet shield. This is set programatically but must match settings available from router
int serverPort = 4444; // this should be the same as the outgoing port on Ipad OSc setup
byte destIp[] = { 192, 168, 1, 100 }; // ip address of ipad
int destPort = 9000; // this should be the same as the incoming port on Ipad OSc setup
Would the YUN automatically link the ipad and the arduino or would I have to set up the YUN to act as a router?
Hope this makes sense.
Thanks,
Nick