Show Posts
Pages: [1] 2 3
1  Using Arduino / Programming Questions / Re: NewSoftSerial to Arduino 1.0 SoftwareSerial issues? on: December 12, 2011, 11:30:30 am
No I don't - I downloaded Arduino 1.0 and extracted the folder to my desktop - it isn't installed and the libraries folder is intact and hasn't been modified since download.

I have a seperate folder called arduino-0023 and inside the libraries folder there, there is a NewSoftSerial library.

I've just deleted and re-downloaded the the Arduino 1.0 software, extracted it to a different location and copy/pasting the code above into a new sketch compiled!  Very very strange, maybe a bad download or something but many thanks for the help.

Regards,
FeersumEndjinn
2  Using Arduino / Programming Questions / Re: NewSoftSerial to Arduino 1.0 SoftwareSerial issues? on: December 12, 2011, 11:06:12 am
Nope, I get a compile error :S

Code:
In file included from sketch_dec12c.cpp:1:
C:\Users\ian.havelock\Desktop\Arduino\libraries\SoftwareSerial/SoftwareSerial.h:95: error: conflicting return type specified for 'virtual void SoftwareSerial::write(uint8_t)'
C:\Users\ian.havelock\Desktop\Arduino\hardware\arduino\cores\arduino/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)'

Very strange!
3  Using Arduino / Programming Questions / NewSoftSerial to Arduino 1.0 SoftwareSerial issues? on: December 12, 2011, 10:35:12 am
Hi all,

I have a program that runs under arduino 0023 fine, using the NewSoftSerial library to talk to a Bluetooth serial module so that I can control my robot from my laptop. 

However, since moving to Arduino 1.0 the NewSoftSerial library has been integrated as the new 'SoftwareSerial' and I have compile issues when moving to SoftwareSerial:

Code:
In file included from Heimdall.cpp:2:
C:\Users\FeersumEndjinn\Desktop\Arduino\libraries\SoftwareSerial/SoftwareSerial.h:95: error: conflicting return type specified for 'virtual void SoftwareSerial::write(uint8_t)'
C:\Users\FeersumEndjinn\Desktop\Arduino\hardware\arduino\cores\arduino/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)'

I have removed any code from my program that doesn't talk to the serial device in order to make it easier to read, my apologies for length:

Code:
#include <icrmacros.h>
#include <SoftwareSerial.h>

char incomingByte = 0;
int laserPin = 12;

long cm;

boolean show_menu = true;

SoftwareSerial btSerial(3, 2);

void setup() {
  pinMode(laserPin, OUTPUT);
  digitalWrite(laserPin, HIGH);
  btSerial.begin(57600);
}


void loop() {
  if (show_menu == true)  {
    print_menu();
    show_menu = false;
  }
  if (btSerial.available()) {
    incomingByte = btSerial.read();
    btSerial.println(incomingByte);
    show_menu = true;
  }

  switch (incomingByte)  {
  case 112:  // p
    ping();
    incomingByte = 0;
    break;
  case 108:  // l
    laser();
    incomingByte = 0;
    break;
  }
}

void print_menu() {
  btSerial.println("*****************");
  btSerial.println("'p'  Ping");
  btSerial.println("'l'  Laser");
  btSerial.print("Please enter choice: ");
  show_menu = false;
}

void laser() {
  if (laserPin = HIGH) {
    digitalWrite(laserPin, LOW);
    btSerial.println("Laser On");
  }  else if (laserPin = LOW)
 // ...
}

void ping() {
  btSerial.println("");
  btSerial.print("Ping Distance: ");
  btSerial.print(cm);
  btSerial.println("cm");
  btSerial.println("");
  delay(100);
}

I use 4 methods from the SoftwareSerial library - all basic.

mySerial.read
mySerial.available
mySerial.print
mySerial.println

All of these are fairly standard so I can't understand why I am having such an issue?

Regards,
FeersumEndjinn
4  Topics / Device Hacking / Re: exposing the internal core metal of a protected tiny wire without damaging it ? on: October 12, 2011, 07:49:42 am
I've used the Scotchlock style before, but you have to be aware that you will easily need 12 - 15mm of play to use these as they require the wires to come into the device in parallel rather than end-to-end.
5  Topics / Device Hacking / Re: Rx and Tx Pins of Sony Ericsson K200i cellphone on: October 12, 2011, 07:46:48 am
Google is your friend?

Do you know if the K200i even has a serial connection?  

After a quick google search I found this:  

http://bestcelldist.com/sony_ericsson_k200i_serial_data_cable.html

Within 2 minutes I've found numerous websites with the information required on the pinout of the Sony Ericsson 12 pin connector.  Not googling before asking here is just plain lazy.
6  Topics / Device Hacking / Re: Copying an RFID tag on: October 12, 2011, 07:34:02 am
It is my (possibly incorrect) understanding that an RFID reader/writer cannot write a full RFID ID string - I believe that only a section of the data string is writable?
7  Topics / Device Hacking / Re: anyone knows a decent affordable logical analyzer ? on: October 12, 2011, 05:27:43 am
Quote
That's the Saleae Logic, I've got one and they are great, no analog though.

______
Rob

Correct, but the original question was for a logic analyzer to monitor USB data exchanges so the Saleae logic would be his cheapest option.
8  Topics / Device Hacking / Re: anyone knows a decent affordable logical analyzer ? on: October 11, 2011, 10:20:47 am
http://www.sparkfun.com/products/8938

$150 including cross-platform software - the build quality is exceptional, and I highly recommend it.
9  Topics / Device Hacking / Re: Stealing data sent to an LCD on: October 11, 2011, 10:05:01 am
One thing - if it is a standard HD44780 compatible LCD, it is a Parallel device, not serial.  There are major differences between the 2 in how they work and what your solution has to be.

A Shift register will normally record 1 byte of data, i.e. 1 character.  It does this by shifting in 8 bits, 1 bit at a time.

Your Arduino really has to do nothing other than sit listening to the LCD lines though, in case it ends up missing something if it is off somewhere else executing something else in a program loop.



10  Using Arduino / Sensors / Re: AnalogRead on Seeeduino Film? on: October 03, 2011, 12:12:03 pm
Is AREF connected?  Have you called analogReference() ?

AREF isn't connected and no I haven't called analog reference - as it is a battery powered circuit, I was going to simply compare the analog reading to a known value for a full battery.

Do you recommend using analogReference()?
11  Using Arduino / Sensors / Re: AnalogRead on Seeeduino Film? on: October 03, 2011, 02:05:42 am
Quote
I am using 2 10k resistors in a standard potential divider circuit.

What value voltage is wired to the top resistor? Is the bottom resistor wired to arduino ground pin as well as the negative terminal of the external voltage being measured?

Lefty




The top resister has 3.3v going to it, and yes the bottom resistor is going to ground.  I measure 1.63v across each resistor so the divider is working as a standard divider.

On my Uno, when I tie the top of the divider to 5v, I see an analog input of around 510 as expected (half of the measurable 1023 for 5 v) and when I tie the top resistor to 3.3v, I see the figure of 335 on the analog pin - again as expected.

     5v
     |
    | |
    | |  R1
    | |
     |
     |
     |------------ Analog Pin (A1)
     |
     |
    | |
    | |  R2
    | |
     |
     |
    GND

Regards,
Morrolan
12  Using Arduino / Sensors / AnalogRead on Seeeduino Film? on: October 02, 2011, 07:08:26 pm
I am trying to read an analog voltage on my Seeeduino Film - using the exact same circuit on my ArduinoUno works exactly as expected and I receive a value of ~335 (expected value when measuring 3.3v), but when I wire it up to my Film I get a constant result of 1023 in return.

I am using 2 10k resistors in a standard potential divider circuit.

Please see my code below:

Code:
int val;

void setup()
{
  pinMode(1, INPUT);
  Serial.begin(9600);
}

void loop()
{
  val = analogRead(1);    // read the input pin
  Serial.println(val);
 
  Serial.println(val);
  delay(1000);
}

My code is as simple as it can get, and I am using the exact same code on both.

It is definitely wired up to Analog pin 1 - all other pins return floating value as would be expected when not tied to anything.

Does anyone have any suggestions?

Regards,
Morrolan
13  Using Arduino / Motors, Mechanics, and Power / Choosing a battery for a wearable servo... on: September 19, 2011, 09:20:15 am
Hi all,

I need to choose a battery to power a small servo that will be worn in an assisted-thumb that I am designing for osteo-arthritis sufferers (like my wife) - ideally it would be a LiPo battery for weight consideration.  I am using a Seeeduino Film (http://www.seeedstudio.com/depot/seeeduino-film-p-689.html?cPath=132_133) - an Arduino compatible micro on a thin film.  I will be running the Seeeduino from a 110mAh battery but it will be controlling a servo, so I want to power the servo independently and just connect the ground.

The Seeeduino charging and power frame is rated at a max of 280mAh, hence seperate batteries.

The batteries I was considering in series give me 7.4v @ 2000mAh (http://www.coolcomponents.co.uk/catalog/product_info.php?cPath=87&products_id=157)?  If so, is it possible to charge them in-circuit or is it best to disconnect them and charge them seperately?

The servo I am considering is http://www.servoshop.co.uk/index.php?pid=HS5495BH&area=Servo.  This gives me the right amount of torque, programmability and size.

Regards,
Morrolan
14  Using Arduino / Sensors / Re: Able to use these components without micro-controller? on: September 13, 2011, 07:34:16 am
What happens if/when the receiver tunes in some other 315 Hz source?

It is standard when sending serial data wirelessly to send a packet of "clearing" data beforehand - it is commonplace to send data before your packet such as repeated 'U's - the reason for U's is because of it's binary bit pattern - 01010101.  I send this 4 times before I send any data.

My receiver then checks to see if these U characters have been received, and if so it then accepts the incoming data, otherwise it ignores it.
15  Using Arduino / Sensors / Re: Detecting human presence - LMI 878 IR detector on: September 13, 2011, 07:19:47 am
Unless you have incredible hearing you shouldn't be able to hear the ultrasonic sensor at all - after all, ultra-sonic does suggest it is beyond normal hearing smiley-grin
Pages: [1] 2 3