Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 210
61  Using Arduino / Networking, Protocols, and Devices / Re: Project Arduino - Wake On Lan your PC over internet (WoL)! on: November 28, 2012, 10:28:03 am
You're most welcome.
62  General Category / General Discussion / Re: How does the Shine do Wireless Sync?? on: November 28, 2012, 05:17:01 am
Apparently, it isn't bluetooth. As it works on iPhones, it can't be NFC.

http://abcnews.go.com/Technology/misfit-shine-fitness-gadget-aspires-apples-hardware-software/story?id=17737467
63  Using Arduino / Networking, Protocols, and Devices / Re: Project Arduino - Wake On Lan your PC over internet (WoL)! on: November 27, 2012, 11:00:26 am
I don't have any UdpBytewise files on my machine, and the sketch compiles ok without them.
64  Topics / Robotics / Re: controlling 3 rc servos from one rc signal on: November 27, 2012, 10:38:28 am
DuaneB has some excellent tutorials on the subject. Start with http://rcarduino.blogspot.co.uk/2012/01/how-to-read-rc-receiver-with.html.
65  Using Arduino / Networking, Protocols, and Devices / Re: Project Arduino - Wake On Lan your PC over internet (WoL)! on: November 27, 2012, 08:54:04 am
I'm sure you get more information than just 'Error compiling".

Here is the sketch, directly from the zip file. I didn't have to download any additional libraries.

Code:
#include <SPI.h>
#include <Ethernet.h>
#include <Utility\Socket.h>

// Make up a mac Address & an IP address. Both should be globally unique or
// at least unique on the local network.
static byte g_abyMyMacAddress[] = {0x00,0x1A,0x4B,0x38,0x0C,0x5C};
static IPAddress g_MyIPAddress(192,168,15,44);

// The machine to wake up. WOL should already be configured for the target machine.
// The free windows program "Wake On LAN Ex 2" by Joseph Cox can be useful for testing the remote
// machine is properly configured. Download it here: http://software.bootblock.co.uk/?id=wakeonlanex2
static byte g_TargetMacAddress[] = {0x00,0x1A,0x4D,0x59,0x98,0xbc};

void setup ()
{
  Ethernet.begin(g_abyMyMacAddress, g_MyIPAddress);
 
  Serial.begin(9600);
  Serial.println("Wake on Lan (WOL) Demo");
  Serial.println("Send 'w' to initiate WOL");
}
 
void loop()
{
 
  // When 'w' is received, send a magic packet to wake the remote machine.
  if(Serial.available() > 0)
    if(Serial.read() == 'w')
    {
      SendWOLMagicPacket(g_TargetMacAddress);
      Serial.println("Magic packet sent");
    }
}

void SendWOLMagicPacket(byte * pMacAddress)
{
  // The magic packet data sent to wake the remote machine. Target machine's
  // MAC address will be composited in here.
  const int nMagicPacketLength = 102;
  byte abyMagicPacket[nMagicPacketLength] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
  byte abyTargetIPAddress[] = { 255, 255, 255, 255 }; // don't seem to need a real ip address.
  const int nWOLPort = 7;
  const int nLocalPort = 8888; // to "listen" on (only needed to initialize udp)

 
  // Compose magic packet to wake remote machine.
  for (int ix=6; ix<102; ix++)
    abyMagicPacket[ix]=pMacAddress[ix%6];
 
  if (UDP_RawSendto(abyMagicPacket, nMagicPacketLength, nLocalPort,
  abyTargetIPAddress, nWOLPort) != nMagicPacketLength)
    Serial.println("Error sending WOL packet");
}

int UDP_RawSendto(byte* pDataPacket, int nPacketLength, int nLocalPort, byte* pRemoteIP, int nRemotePort)
{
  int nResult;
  int nSocketId; // Socket ID for Wiz5100

  // Find a free socket id.
  nSocketId = MAX_SOCK_NUM;
  for (int i = 0; i < MAX_SOCK_NUM; i++)
  {
    uint8_t s = W5100.readSnSR(i);
    if (s == SnSR::CLOSED || s == SnSR::FIN_WAIT)
  {
      nSocketId = i;
      break;
    }
  }

  if (nSocketId == MAX_SOCK_NUM)
    return 0; // couldn't find one.

  if (socket(nSocketId, SnMR::UDP, nLocalPort, 0))
  {
    nResult = sendto(nSocketId,(unsigned char*)pDataPacket,nPacketLength,(unsigned char*)pRemoteIP,nRemotePort);
    close(nSocketId);
  } else
    nResult = 0;

  return nResult;
}

66  Using Arduino / Networking, Protocols, and Devices / Re: Project Arduino - Wake On Lan your PC over internet (WoL)! on: November 27, 2012, 07:54:50 am
I clicked on the link at the end of "Here's the source for...", to download the sketch. Unzipped it and opened it in the IDE. The link points to http://www.blueleafsoftware.com/Products/MegunoLink/Downloads/WOLTest.zip.

Colour coding in the IDE is really rather hit and miss. It relies on library developers providing the appropriate information, in the form of a keywords.txt file, in the library directory.
67  Using Arduino / Project Guidance / Re: 3 x GND on Arduino ADK on: November 27, 2012, 05:34:36 am
They are all connected. It doesn't matter which you use.
68  Using Arduino / Displays / Re: question of code display on: November 27, 2012, 05:30:28 am
Does it compile? What happens when you run it?

You might need to add
Code:
#include <Wire.h>
at the top.
69  Using Arduino / Networking, Protocols, and Devices / Re: Project Arduino - Wake On Lan your PC over internet (WoL)! on: November 27, 2012, 05:29:08 am
The download on the first link compiled ok in IDE 1.0.1.
70  Using Arduino / Sensors / Re: video fadeout question! again.. on: November 27, 2012, 05:22:34 am
This is an Arduino forum, not Processing. Try asking at http://forum.processing.org/programming-questions.
71  Using Arduino / Sensors / Re: video fadeout question! again.. on: November 27, 2012, 04:38:35 am
Quote
I can't come up with the code..

Which code? The Arduino side is trivial, analogRead(), then Serial.write() or Serial.print(). Ask at Processing's forum for that side.

72  Using Arduino / Programming Questions / Re: serialEvent with yes/no dialogue? on: November 27, 2012, 04:31:46 am
It isn't interrupt driven. It is called after each iteration of loop(), in main.cpp, which the Arduino IDE adds to your sketch:

Code:
#include <Arduino.h>

int main(void)
{
init();

#if defined(USBCON)
USBDevice.attach();
#endif

setup();
   
for (;;) {
loop();
if (serialEventRun) serialEventRun();
}
       
return 0;
}
73  Using Arduino / Sensors / Re: video fadeout question! again.. on: November 27, 2012, 03:50:08 am
Are you asking for help with the Processing code? Processing has its own forum at http://forum.processing.org/.

All the Arduino code will be doing is sending the result of the analogRead(), over serial, to Processing.
74  Using Arduino / Networking, Protocols, and Devices / Re: how to connect the ps3 controller to an arduino wirelessly ? on: November 24, 2012, 11:58:44 am
PS3 controllers are bluetooth devices, so you'll need a bluetooth module/shield. Circuits@Home have a USB host shield that supports usb bluetooth dongles, and they have a PS3 controller library for it.

http://www.circuitsathome.com/products-page/arduino-shields
75  Using Arduino / Networking, Protocols, and Devices / Re: how to connect the ps3 to an arduino wirelessly ? on: November 24, 2012, 09:15:57 am
Please don't crosspost - http://arduino.cc/forum/index.php/topic,133952.0.html
Pages: 1 ... 3 4 [5] 6 7 ... 210