KSduino


has ever used ksduino?

i trying , running. have linked code below, cannot working

i trying w5200 , running today , spent day figuring out w5200 not compatible w5100 code. surfertim, able download code , webserver test code working properly.

if ksduino, appreciate it.

thanks!
john

/* -*- mode: c; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
/*
* ksduino simple-01 example sketch
*
* simple_01.ino

* ksduino simple-01 ksduino-library example sketch
* example part of ksduino libray arduino
*
* copyright (c) kirill scherba 2012 <kirill@scherba.ru>
*
* ksduino library & examples free software: can redistribute and/or modify it
* under terms of gnu general public license published the
* free software foundation, either version 3 of license, or
* (at option) later version.
*
* ksduino-server distributed in hope useful, but
* without warranty; without implied warranty of
* merchantability or fitness particular purpose.
* see gnu general public license more details.
*
* should have received copy of gnu general public license along
* program.  if not, see <http://www.gnu.org/licenses/>.
*/

/**
* @file simple_01.ino
*
* simple-01 example getting started ksduino library
*
*/

// includes -------------------------------------------------------------

#include <spi.h>
#include <ethernetudp.h>

#include <ksduino.h>

// user definition -----------------------------------------------------

// change values yours

// arduinos id & password
unsigned int deviceid = 3436;
unsigned int devicepwd = 1025;

// arduinos mac, ip & port used in local network
byte mac[] = { 0xde, 0xad, 0xbe, 0xef, 0xfe, 0xed };
byte ip[] = { 10, 0, 0, 38 };
unsigned int port = 58833;

// server definition -----------------------------------------------------

// not change values

// ksduino server address & port
byte serverip[] = { 178,63,53,233 };
unsigned int serverport = 9930;

// ----------------------------------------------------------------------------

// create ksduino class
ksduino ksd (deviceid, devicepwd, serverip, serverport);

// ----------------------------------------------------------------------------

void setup()
{
// start ksduino @ beginning of setup
  ksd.begin (mac, ip, port);   
}

void loop()
{
  static byte d_value = low;

  // set value d1 variable 
  if (d_value == low) d_value = high; else  d_value = low;   
 
  // send d1 value ksduino server
  ksd.sendone ("d1", d_value); 
 
  // delay
  delay (1000);
 
  // ksduino update should @ end of loop
  ksd.update (); 
}



Arduino Forum > Using Arduino > Installation & Troubleshooting > KSduino


arduino

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support