Show Posts
Pages: [1] 2 3 ... 5
1  Using Arduino / Motors, Mechanics, and Power / Re: Need an information about the interfacing between Arduino and a Stepper motor on: July 07, 2014, 09:39:04 am
have a look at pololu 4988 stepper motor driver
http://www.pololu.com/product/1183

the diode protection you are looking for is to prevent back emf,
as the stepper is constructed from two (or more coils) there is a huge back surge in voltage as it is switched off
need to look at coil theory, im just mentioning the simple stuff

the diode prevents this from destroying any control electronics

i cant remember if the diode are internally configured on this device but for what its worth it works perfect first time out of the box.

see also accelstepper library for example sketches for running the motor
[url]http://www.airspayce.com/mikem/arduino/AccelStepper/index.html
2  Using Arduino / Motors, Mechanics, and Power / Re: Diffrence between Accelstepper commands on: July 07, 2014, 09:26:13 am
So you didnt get a reply,
sorry about that
try stepper.runSpeed(); instead of run to position and you will see it works
im doing a similar thing
Code:
#include <AccelStepper.h>
AccelStepper stepper(2, 10, 11); // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5

#include <LiquidCrystal.h>
long RFlag=0;
/*
 The circuit:
 * LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground

*/
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);


void setup()
{
  //Serial.begin(9600);
   pinMode(9, INPUT_PULLUP);
   // set up the LCD's number of columns and rows:
  //lcd.begin(16, 2);
  // Print a message to the LCD.
  //lcd.print("Ready");
}

void loop()
{
  float FRate = analogRead(A5);//feedrate
  int sensorVal = digitalRead(9);
 
  // set the LDCD ursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  //lcd.setCursor(0, 1);
  // print the feed rate
  //lcd.print("Feed mm/s ");
  //lcd.setCursor(11, 1);
  //lcd.print(FRate);
 
 
  if (sensorVal == HIGH) {
   
   RFlag=1;   
   stepper.setMaxSpeed((FRate)*2.92);
   stepper.setSpeed((FRate)*2.92);
   stepper.runSpeed();
   
   }
   
      else {
        if (RFlag==1){
         
   //stepper.setMaxSpeed((FRate)*2.92);
   //stepper.setSpeed((FRate)*2.92);
   //stepper.runSpeed();
 
   
   RFlag=0;
           }
        }
  }
   
}

im looking for my motor to back off one turn when its finished and then stop
work in progress
3  Using Arduino / Programming Questions / Re: Concatenate from buffer on: February 09, 2014, 07:31:51 am
Code:
Thanks Rob
works a treat

look at void DumpAndResetTable() for your input


Just to keep pointless Paul happy here is the code

[code#]
include <DCC_Decoder.h>

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Defines and structures
//
#define kDCC_INTERRUPT            0
 int count;
    byte validBytes;
    byte data[6];
    
typedef struct
{
    int count;
    byte validBytes;
    byte data[6];
} DCCPacket;

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// The dcc decoder object and global data
//
int gPacketCount = 0;
int gIdlePacketCount = 0;
int gLongestPreamble = 0;

DCCPacket gPackets[25];

static unsigned long lastMillis = millis();
    
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Packet handlers
//

// ALL packets are sent to the RawPacket handler. Returning true indicates that packet was handled. DCC library starts watching for
// next preamble. Returning false and library continue parsing packet and finds another handler to call.
boolean RawPacket_Handler(byte byteCount, byte* packetBytes)
{
        // Bump global packet count
    ++gPacketCount;
    
    int thisPreamble = DCC.LastPreambleBitCount();
    if( thisPreamble > gLongestPreamble )
    {
        gLongestPreamble = thisPreamble;
    }
    
        // Walk table and look for a matching packet
    for( int i=0; i<(int)(sizeof(gPackets)/sizeof(gPackets[0])); ++i )
    {
        if( gPackets[i].validBytes )
        {
                // Not an empty slot. Does this slot match this packet? If so, bump count.
            if( gPackets[i].validBytes==byteCount )
            {
                char isPacket = true;
                for( int j=0; j<byteCount; j++)
                {
                    if( gPackets[i].data[j] != packetBytes[j] )
                    {
                        isPacket = false;
                        break;
                    }
                }
                if( isPacket )
                {
                   gPackets[i].count++;
                  
                  
                   return false;
                }
            }
        }else{
                // Empty slot, just copy over data
            gPackets[i].count++;
            gPackets[i].validBytes = byteCount;
            for( int j=0; j<byteCount; j++)
            {
                gPackets[i].data[j] = packetBytes[j];
                
                
            }
            return false;
        }
    }    
    
    return false;
}

// Idle packets are sent here (unless handled in rawpacket handler).
void IdlePacket_Handler(byte byteCount, byte* packetBytes)
{
    ++gIdlePacketCount;
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Setup
//
void setup()
{
   Serial.begin(9600);
    
   DCC.SetRawPacketHandler(RawPacket_Handler);  
   DCC.SetIdlePacketHandler(IdlePacket_Handler);
            
   DCC.SetupMonitor( kDCC_INTERRUPT );  
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void DumpAndResetTable()
{
    char buffer60Bytes[60];
    
    byte b = 0;

for (int i = 0; i < 8; i++) {
b <<= 1;
b |= buffer60Bytes[i] == '1' ? 1 : 0;
}

  Serial.print (b);
  Serial.print (" ");  
  
  
       Serial.print (buffer60Bytes[0]);//addresss
       Serial.print (buffer60Bytes[1]);
       Serial.print (buffer60Bytes[2]);
       Serial.print (buffer60Bytes[3]);
       Serial.print (buffer60Bytes[4]);
       Serial.print (buffer60Bytes[5]);
       Serial.print (buffer60Bytes[6]);
       Serial.print (buffer60Bytes[7]);
       Serial.print (" ");
      
      
       Serial.print (buffer60Bytes[9]);//command 3F
       Serial.print (buffer60Bytes[10]);
       Serial.print (buffer60Bytes[11]);
       Serial.print (buffer60Bytes[12]);
       Serial.print (buffer60Bytes[13]);
       Serial.print (buffer60Bytes[14]);
       Serial.print (buffer60Bytes[15]);
       Serial.print (buffer60Bytes[16]);
       Serial.print (" ");
      
       Serial.print (buffer60Bytes[18]);//Dir and speed
       Serial.print (buffer60Bytes[19]);
       Serial.print (buffer60Bytes[20]);
       Serial.print (buffer60Bytes[21]);
       Serial.print (buffer60Bytes[22]);
       Serial.print (buffer60Bytes[23]);
       Serial.print (buffer60Bytes[24]);
       Serial.print (buffer60Bytes[25]);
       Serial.print (" ");
      
       Serial.print (buffer60Bytes[27]);//XOR
       Serial.print (buffer60Bytes[28]);
       Serial.print (buffer60Bytes[29]);
       Serial.print (buffer60Bytes[30]);
       Serial.print (buffer60Bytes[31]);
       Serial.print (buffer60Bytes[32]);
       Serial.print (buffer60Bytes[33]);
       Serial.println (buffer60Bytes[34]);
    
    Serial.print("Total Packet Count: ");
    Serial.println(gPacketCount, DEC);
    
    Serial.print("Idle Packet Count:  ");
    Serial.println(gIdlePacketCount, DEC);
        
    Serial.print("Longest Preamble:  ");
    Serial.println(gLongestPreamble, DEC);
      
    Serial.println("Count    Packet_Data");
    for( int i=0; i<(int)(sizeof(gPackets)/sizeof(gPackets[0])); ++i )
    {
        if( gPackets[i].validBytes > 0 )
        {
            Serial.print(gPackets[i].count, DEC);
            if( gPackets[i].count < 10 )
            {
                Serial.print("        ");
            }else{
                if( gPackets[i].count < 100 )
                {
                    Serial.print("       ");
                }else{
                    Serial.print("      ");
                }
                

                
            }
            Serial.println( DCC.MakePacketString(buffer60Bytes, gPackets[i].validBytes, &gPackets[i].data[0]) );
            

            
            
        }
        gPackets[i].validBytes = 0;
        gPackets[i].count = 0;
    }
    Serial.println("============================================");
    
    gPacketCount = 0;
    gIdlePacketCount = 0;
    gLongestPreamble = 0;
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Main loop
//
void loop()
{
    DCC.loop();
    
    if( millis()-lastMillis > 2000 )
    {
        DumpAndResetTable();
        lastMillis = millis();
        
    }
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4  Using Arduino / Programming Questions / Re: Concatenate from buffer on: February 09, 2014, 07:06:02 am
Hi Rob,
Yes im looking to get a decimal value from binary of the ascii 1s and 0s.

i did try reading each value and adding is value to the power of 2 to an int variable.
i have tried joining the characters to make a string containing 8 characters and was then hoping to convert that to a decimal value
neither of which were successful.

when i tried to print out each buffer bin using a for loop i got nothing when i printed the count it was working fine, just the count did not translate to the buffer bin
ie
for i =0,i=7, i++
serial.print (buffer60Bytes);

i know i should stick to engineering but Arduinos as so addictive.
5  Using Arduino / Programming Questions / Concatenate from buffer on: February 09, 2014, 06:01:34 am
im wanting to get values from a buffer and convert them to decimal values.

im working on A model train DCC decoder and the code im trying to manipulate is as follows

char buffer60Bytes[60];
i have discovered i can write out the contents

       Serial.print (buffer60Bytes[9]);//command 3F
       Serial.print (buffer60Bytes[10]);
       Serial.print (buffer60Bytes[11]);
       Serial.print (buffer60Bytes[12]);
       Serial.print (buffer60Bytes[13]);
       Serial.print (buffer60Bytes[14]);
       Serial.print (buffer60Bytes[15]);
       Serial.print (buffer60Bytes[16]);
       Serial.print (" ");

but it looks like each bin in the buffer contains an ascii character
so 00111111  in this case 3F is 8 ascii characters long.

i think the reason the coder has done it this way is because the pulses 1 & 0 are clocked in serially

so if i wanted to obtain a decimal value result from these 8 bits how might i do it

the first four blocks of 8 are of interest to me (buffer60Bytes[0]); to (buffer60Bytes[32]);
as they contain the locomotive DCC data

they come out as 11001010 00111111 00100000 11110101
which translates to
40 the address of the train
3F the command
** the speed and direction
and an Xor checksum
apparently although ive not proven this yet either

so in short, i have a buffer and i want to add the content of so many bins together to make a decimal value
any help would be much appreciated

for refference
http://www.mynabay.com/arduino/2-uncategorised/14-arduino-dcc-monitor

the sketch is the monitor example in the download. just in case anyone is interested
6  Using Arduino / Programming Questions / Re: Confused by SoftI2C on: December 28, 2013, 05:03:51 am
I want to use the Ardunio to its max.
i need 6 digital pins for relay control, 2 digital pins for soft serial/RS485 and 6 analogue inputs , 2 pins for I2C bus to connect motor servos (MD03s) and an IMU6050. leaving the 2 hardware serial pins for reprogramming if reqd.

I build my own Arduino boards using a boot loaded ATMEGA328 so i can fit as much circuitry as i can to a control board.
i could use the Arduino mega instead but i would have to use the mega board instead of my own build- limited expertise and all that

Im still messing around with submersible vehicles and this configuration will save me at least £400 as i wont need a PC104 single board PC on board my vehicle.

i was hoping that someone out on the ether had connected 2 arduinos with softI2C,  searched for ages and found nothing.
you mentioned the code was just the Master.

is there a way i can have the master join the bus as channel 0 and for eg transmit to address  4 with a value of 200.
if i can get this far i can change the slave to use the hardware wire library instead.
cheers
Jason
7  Using Arduino / Programming Questions / Re: Confused by SoftI2C on: December 27, 2013, 01:11:04 pm
Hi Drew,

The only example i have of softI2CMaster is this for reading a realtime clock

Code:
#include <I2cMaster.h>

// select software or hardware i2c
#define USE_SOFT_I2C 0

#if USE_SOFT_I2C
#if defined(__AVR_ATmega1280__)\
|| defined(__AVR_ATmega2560__)
// Mega analog pins 4 and 5
// pins for 168/328 shield on Mega
#define SDA_PIN 58
#define SCL_PIN 59

#elif defined(__AVR_ATmega168__)\
||defined(__AVR_ATmega168P__)\
||defined(__AVR_ATmega328P__)
// 168 and 328 Arduinos analog pin 4 and 5
#define SDA_PIN 18
#define SCL_PIN 19

#else  // CPU type
#error unknown CPU
#endif  // CPU type
// An instance of class for software master
SoftI2cMaster rtc(SDA_PIN, SCL_PIN);
#else // USE_SOFT_I2C
// hardware master with pullups enabled
TwiMaster rtc(true);
#endif  // USE_SOFT_I2C

//------------------------------------------------------------------------------
void setup(void) {
  Serial.begin(9600);

  uint8_t add = 1;

  // try read
  do {
    if (rtc.start(add | I2C_READ)) {
      Serial.print("Add read: ");
      Serial.println(add, HEX);
      rtc.read(true);
    }
    rtc.stop();
    //add += 2;
  } while (add);

  // try write
  //add = 0;
  do {
    if (rtc.start(add | I2C_WRITE)) {
      Serial.print("Add write: ");
      Serial.println(add, HEX);
    }
    rtc.stop();
    //add += 2;
  } while (add);

  Serial.println("Done");
}
void loop(void){}

As you can see from my earlier post it dosent follow the same format as the wire I2C
the library is posted here
http://rweather.github.io/arduinolibs/classSoftI2C.html 

a kindergarten idiot guide would be much appreciated.
i would like to be able to send from the master 1 byte to any slave by its address
and for a slave being poled by the master to receive the byte of data.

i would really appreciate some assistance
8  Using Arduino / Programming Questions / Re: Confused by SoftI2C on: December 24, 2013, 08:13:48 am
I knew i was a genius,
i have obviously asked something way beyond the intelligence of the forum.
9  Using Arduino / Programming Questions / Confused by SoftI2C on: December 13, 2013, 08:34:36 am
Im wanting to use SoftI2C to connect 2 arduino Unos together.
I need all analogue pins for other use in program so i need to change to different pins from analogue 4&5 (the hardware SCL/SDA lines on the uno)

the code i am using is the wire master/slave examples.
where wire allows the setting of an address to listen to and master writes to it
im not 100% sure how this is done using SoftI2C.

Ie.    Wire.begin(4);                // join i2c bus with address #4

Receiver Code

Code:
#include <Wire.h>

void setup()
{
  Wire.begin(4);                // join i2c bus with address #4
  Wire.onReceive(receiveEvent); // register event
  Serial.begin(9600);           // start serial for output
}

void loop()
{
  delay(100);
}

// function that executes whenever data is received from master
// this function is registered as an event, see setup()
void receiveEvent(int howMany)
{
  while(1 < Wire.available()) // loop through all but the last
  {
    char c = Wire.read(); // receive byte as a character
    Serial.print(c);         // print the character
  }
  int x = Wire.read();    // receive byte as an integer
  Serial.println(x);         // print the integer
}

And  Master
Code:
#include <Wire.h>

void setup()
{
  Wire.begin(); // join i2c bus (address optional for master)
}

byte x = 0;

void loop()
{
  Wire.beginTransmission(4); // transmit to device #4
  Wire.write("x is ");        // sends five bytes
  Wire.write(x);              // sends one byte 
  Wire.endTransmission();    // stop transmitting

  x++;
  delay(500);
}

A simple straight forward example code for a SoftI2C approach to bothe the master and slave above would be very much appreciated.

10  Using Arduino / Programming Questions / Re: Gyro/Compass turns counter on: April 11, 2013, 10:45:14 am
paul,

The starting comment of
"Can anyone help me to create some code"
should have given the game away, i was asking for help to start writing code that will do what is required.
if i had code asking on the forum would be an obvious waste of time.

where do you get off being such a plonker, if you dont like certain people on this forum then dont reply to them and dont waist your time.
11  Using Arduino / Programming Questions / Gyro/Compass turns counter on: April 10, 2013, 08:10:35 am
Can anyone help me to create some code that will count by increment or decrement a number of times that a robot/vehicles heading passes through zero.

im working on a project building a submersible vehicle and need to remember how many twists have been introduced into the vehicles tether/cable.

Eg. if throughout a dive i managed to go right around the compass rose clockwise 4 times but on heading back to my launch point went once around the compass rose counter-clockwise the result will be 3 positive turns.

this is important with submersibles as the number of twists you put in a cable will start to deform and break the cable.

would be most interested to hear if anyone has any ideas
12  Using Arduino / Programming Questions / MAX7456 On screen display - getting started on: March 24, 2013, 08:16:36 am
Im trying to build an on screen display, its based on this thread
http://arduino.cc/forum/index.php/topic,8785.0.html

I have been messing around trying various sketches to get somthing to work with no luck
i decide to go back to basics and then hit a brickwall.
 Here is the code (its not mine all credit to its author etc)

Code:
#include <EEPROM.h> //Needed to access eeprom read/write functions

#define DATAOUT 11//MOSI
#define DATAIN  12//MISO
#define SPICLOCK  13//sck
#define MAX7456SELECT 10//ss
#define VSYNC 2// INT0

//MAX7456 opcodes
#define DMM_reg   0x04
#define DMAH_reg  0x05
#define DMAL_reg  0x06
#define DMDI_reg  0x07
#define VM0_reg   0x00
#define VM1_reg   0x01

//MAX7456 commands
#define CLEAR_display 0x04
#define CLEAR_display_vert 0x06
#define END_string 0xff
// with NTSC
#define ENABLE_display 0x08
#define ENABLE_display_vert 0x0c
#define MAX7456_reset 0x02
#define DISABLE_display 0x00

// with PAL
// all VM0_reg commands need bit 6 set
//#define ENABLE_display 0x48
//#define ENABLE_display_vert 0x4c
//#define MAX7456_reset 0x42
//#define DISABLE_display 0x40

#define WHITE_level_80 0x03
#define WHITE_level_90 0x02
#define WHITE_level_100 0x01
#define WHITE_level_120 0x00

// with NTSC
#define MAX_screen_size 390
#define MAX_screen_rows 13

// with PAL
//#define MAX_screen_size 480
//#define MAX_screen_rows 16

#define EEPROM_address_hi 510
#define EEPROM_address_low 511
#define EEPROM_sig_hi 'e'
#define EEPROM_sig_low 's'

volatile byte screen_buffer[MAX_screen_size];

volatile byte writeOK;
volatile byte valid_string;
volatile byte save_screen;
volatile int  incomingByte;
volatile int  count;

//
//##############################
//# 30 characters per line     #
//# 13 lines per screen        #
//# start'[' end ']' 390 chars #
//# add '~' if front of '[' to #
//# force write to eeprom      #
//# '~[]' to zero out eeprom   #
//##############################
//
//[
//
//
//       THIS IS A TEST
//
//    Arduino / MAX7456-OSD
//
//  ABCDEFGHIJKLMNOPQRSTUVWXYZ
//         0123456789
//]
//

//////////////////////////////////////////////////////////////
void setup()
{
  byte spi_junk, eeprom_junk;
  int x;
  Serial.begin(9600);
  Serial.flush();

  pinMode(MAX7456SELECT,OUTPUT);
  digitalWrite(MAX7456SELECT,HIGH); //disable device

  pinMode(DATAOUT, OUTPUT);
  pinMode(DATAIN, INPUT);
  pinMode(SPICLOCK,OUTPUT);
  pinMode(VSYNC, INPUT);

  // SPCR = 01010000
  //interrupt disabled,spi enabled,msb 1st,master,clk low when idle,
  //sample on leading edge of clk,system clock/4 rate (4 meg)
  SPCR = (1<<SPE)|(1<<MSTR);
  spi_junk=SPSR;
  spi_junk=SPDR;
  delay(250);

  // force soft reset on Max7456
  digitalWrite(MAX7456SELECT,LOW);
  spi_transfer(VM0_reg);
  spi_transfer(MAX7456_reset);
  digitalWrite(MAX7456SELECT,HIGH);
  delay(500);

  // set all rows to same charactor white level, 90%
  digitalWrite(MAX7456SELECT,LOW);
  for (x = 0; x < MAX_screen_rows; x++)
  {
    spi_transfer(x + 0x10);
    spi_transfer(WHITE_level_90);
  }

  // make sure the Max7456 is enabled
  spi_transfer(VM0_reg);
  spi_transfer(ENABLE_display);
  digitalWrite(MAX7456SELECT,HIGH);


  // clear the array
  for (x = 0; x < MAX_screen_size; x++)
  {
    screen_buffer[x] = 0x00;
  }

  writeOK = false;
  valid_string = false;
  save_screen = false;
  incomingByte = 0;
  count = 0;

 // check to see if we have a default screen stored in eeprom
  eeprom_junk = EEPROM.read(EEPROM_address_hi);
  if (eeprom_junk == EEPROM_sig_hi)
  {
    eeprom_junk = EEPROM.read(EEPROM_address_low);
    if (eeprom_junk == EEPROM_sig_low)
    {
      for (x = 0; x < MAX_screen_size; x++)
      {
        screen_buffer[x] = EEPROM.read(x);
      }
      writeOK = true;
      count = MAX_screen_size;
    }
  }

  Serial.println("Ready for text file download");
  Serial.println("");
  delay(100); 
}

I get this error

sketch_mar24a:57: error: 'spi_transfer' was not declared in this scope

i figured the SPI.h needed to be included so i added it to the code
still same error.
i suspect this has something to do with the IDE version im using - still on Arduino IDE Ver 1.0.1
but i have tried the code on Ver 1.5 and the old Ver 22.

please help
sketch_mar24a:57: error: 'spi_transfer' was not declared in this scope
13  Using Arduino / Project Guidance / Re: calculating my power needs on: March 03, 2013, 06:04:31 am
I have built my 3D printer and opted for a PC laptop power supply
Its rated for 8A output.

you might want to look at the Reprap wiki again as you may find that the 24v is the stepper motor rating and not what is actually needed.

when playing around with steppers i found that you get a choice between torque or speed, increasing the voltage provides more torque but doesnt seem to make the motor perform any faster.  i aslo ended up at a point where if i increased the voltage it made no difference apart from loading the current sensor circuit in my bench PSU.  I got no where near 24v, the motors im using i think are 12v but running with the pololu ref voltage set for 3.5v ish

http://reprap.org/wiki/Sanguinololu

in the end i bought all of my kit (sing-along-with-lulu board, 4 motors and the pololu stepper drivers) from think3dprint3d under the illusion that it would be plug and play.
to be fair it was pretty straight forward - the problems i had were more to do with setting up the mechanical accuracy of the axis.

As this is the arduino forum the Gen7 board is an excellent choice as it is built around our beloved chip.

anyways dont listen to me - Grumpy Mikes the dude
14  Using Arduino / Project Guidance / Re: Need help getting response from RS485 Slave on: March 03, 2013, 05:42:07 am
Hi astrofrostbyte,

yes you are right, it got messed up when i coppied it over.

The code actually works i just slipped up.

the main problem i am having is that sispite the message being returned and
The returned message being read, which it must be as the value in buffer
  • equals the channel and the result of this acknowledge is that the error LED does not light up.

 if (received)
  { if (buf
  • != channel) 
     return;
   ...etc....

if i try to read the buffer values and print them to the monitor outside of the loop i get 0
if i do the same inside the loop it wont compile.

so if the values are sent and are there how can i transfer them to use them elsewher in my code
ie. write them to variables.

J.
15  Using Arduino / Networking, Protocols, and Devices / Re: Converting old hardware serial code to newsofwareserial code on: March 03, 2013, 05:30:40 am
Thanks John,
much appreciated
Pages: [1] 2 3 ... 5