Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino error on launch (osx intel) on: April 04, 2006, 06:51:54 am
ok I've done a bit more homework. Processing has the same problems with the serial library see here: I'm not entirely sure how to proceed from here if  any of you have suggestions I'd be happy to give it a try.

gck thanks for your suggestions I've checked serial device selected and made sure there where no other apps using the port. Sketches compile fine..

2  Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino error on launch (osx intel) on: April 03, 2006, 11:54:25 pm
Hi Massimo I had a go at building rxtx. downloaded done ./configure; make; sudo make install; without problems I copy the new library to the Arduino folder and now the app launches (which is good news smiley ) The problem I get now is that I try to run serial_write_basic for instance and get the following error..

Error inside Serial.<init>() Unknown Application
      at java.awt.Component.processMouseEvent(
      at java.awt.Component.processEvent(
      at java.awt.Container.processEvent(
      at java.awt.Component.dispatchEventImpl(
      at java.awt.Container.dispatchEventImpl(
      at java.awt.Component.dispatchEvent(
      at java.awt.LightweightDispatcher.retargetMouseEvent(
      at java.awt.LightweightDispatcher.processMouseEvent(
      at java.awt.LightweightDispatcher.dispatchEvent(
      at java.awt.Container.dispatchEventImpl(
      at java.awt.Window.dispatchEventImpl(
      at java.awt.Component.dispatchEvent(
      at java.awt.EventQueue.dispatchEvent(
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(
      at java.awt.EventDispatchThread.pumpEvents(
      at java.awt.EventDispatchThread.pumpEvents(
[VP 1] Device is not responding correctly.

BTW I have also tried with the serial library in prcessing  0111 which claims to be universal binary and it doesn't work either I get the same error.  :-/
3  Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino error on launch (osx intel) on: April 03, 2006, 03:16:39 am
Hey Massimo I'm not quite the java guru but if you give me precise instructions I can have a go myself. I've got xcode & eclipse running on the machine already...

4  Forum 2005-2010 (read only) / Troubleshooting / Arduino error on launch (osx intel) on: April 02, 2006, 11:58:40 am
Hi there I've tried to install arduino on a new machine (intel mac) and get the following error (see pic). Have you ever seen this before? any suggestions on what might be causing it? thank you.
5  Forum 2005-2010 (read only) / Syntax & Programs / Re: trouble writing PIR library (C++) on: August 28, 2009, 10:00:30 am
Thanks Mike, I tried that but the problem seems to persist. One sensor works more than one doesn't.
6  Forum 2005-2010 (read only) / Syntax & Programs / trouble writing PIR library (C++) on: August 27, 2009, 12:51:57 pm
Hello I am trying to convert the playground code for detecting presence using PIRs into a library so I can connect several PIRs together.

I am new to C++ but have followed a few examples. The code compiles but doesn't seem to work as expected. I get readings from two PiRs the first few times but then I only get readings from one of them (the second object initialised). I have the suspicion that objects don't work as I think in C++ and one object is overwriting variables for all, I have declared variables protected but not much luck.

all comments, suggestions much appreciated.
#ifndef PIR_H
#define PIR_H

#include "WProgram.h"
#include "inttypes.h"

class PIR
    PIR(int nodeId, int pinId, long pause);
    void initialise();
    void checkStatus();
    int _nodeId;
    int _pinId;
    unsigned long lowIn;        
    unsigned long start;
    unsigned long end;
    int _pause;

    bool _ready;
    bool lockLow;
    bool takeLowTime;

#include "PIR.h"

 * The Parallax PIR Sensor is an easy to use digital infrared motion sensor module.
 * (
 * The sensor?s output pin goes to HIGH if motion is present.
 * However, even if motion is present it goes to LOW from time to time,
 * which might give the impression no motion is present.
 * This program deals with this issue by ignoring LOW-phases shorter than a given time,
 * assuming continuous motion is present during these phases.

bool lockLow = true;

PIR::PIR(int nodeId, int pinId, long pause){
_nodeId = nodeId;
_pinId = pinId;
_pause = pause;

void PIR::initialise(){

    pinMode(_pinId, INPUT);
    digitalWrite(_pinId, LOW);

    //give the sensor some time to calibrate
    for(int i = 0; i < 30; i++){
    Serial.println("SENSOR ACTIVE");
    _ready = true;

void PIR::checkStatus(){
    if (_ready == true) {
        if(digitalRead(_pinId) == HIGH){
              //makes sure we wait for a transition to LOW before any further output is made:
              lockLow = false;            
              start = millis()/1000;
            takeLowTime = true;
        if(digitalRead(_pinId) == LOW){
                 lowIn = millis();          //save the time of the transition from high to LOW
                 takeLowTime = false;       //make sure this is only done at the start of a LOW phase
               //if the sensor is low for more than the given pause,
               //we assume that no more motion is going to happen
               if(!lockLow && millis() - lowIn > _pause){  
                 //makes sure this block of code is only executed again after
                 //a new motion sequence has been detected
                 lockLow = true;                      
                 end = (millis() - _pause)/1000;
                 Serial.print( _nodeId );
                 Serial.print( " " );
                 Serial.print( _pinId );
                 Serial.print( " " );
                 Serial.print( end - start );
7  Forum 2005-2010 (read only) / Troubleshooting / BT Board not showing up for pairing on: March 25, 2007, 02:32:15 pm
Hi all,

I have been working with a couple of BT boards for the last couple of weeks, yesterday I removed all the paired devices on my machine (macbook pro running osx 10.4.9) to start over and test my setup for installation with another machine. One of the BT boards is not showing up for pairing anymore, it powers up but it is not discoverable anymore... I have tried to pair it with other 2 machines and it doesn't work either...

has anyone had a similar experience? do you have any suggestions of what might be happening?

many thanks,

8  Forum 2005-2010 (read only) / Interfacing / Re: i2c and a Dallas RTC Anyone?? on: July 02, 2007, 12:17:35 pm
yep, that's done the trick. One final thing if I'm setting the hour to be 6, how do I know if its am or pm? or how can I set it to be 18:00 instead of 6?

Many thanks,
9  Forum 2005-2010 (read only) / Interfacing / Re: i2c and a Dallas RTC Anyone?? on: July 02, 2007, 11:37:40 am
Bob thanks for your reply, the time display issue seems to be solved now.

What I am still struggling with is the module configuration. To set it to 17:31:00 Monday, 2-7-2007 I am doing the following on setup()

Wire.beginTransmission(104); // transmit to device #104, the ds1307
  Wire.send(0);  //sec
  Wire.send(31); //min
  Wire.send(17);  //hour
  Wire.send(2);  //day
  Wire.send(2);  //date
  Wire.send(7);  //month
  Wire.send(7);  //year
  Wire.endTransmission();    // stop transmitting

  delay(100); /* */

when printing back the values, I get:

21:05:32 Sunday, 2/2/2007

something its obviously not working..  smiley-razz
10  Forum 2005-2010 (read only) / Interfacing / Re: i2c and a Dallas RTC Anyone?? on: July 02, 2007, 03:05:28 am
Hi there, I have modified slightly the code to give me the full set of data the module outputs, and removed the code specific to the display.

the problem I'm getting is that the data returned doesn't seem to make much sense...  smiley

 * A single-digit clock
 * (c) 2007 Bob Copeland <me at>

#include <Wire.h>

void setup()


    // program the time & enable clock
   Wire.send(0x80 | 0x21);

void loop()
  // reset register pointer

  Wire.requestFrom(0x68, 6);
  char secs = Wire.receive();
  char mins = Wire.receive();
  char hrs = Wire.receive();
  char day = Wire.receive();
  char date = Wire.receive();
  char month = Wire.receive();
  char year = Wire.receive();

  Serial.print("time is: ");
  Serial.print( hrs, DEC );
  Serial.print( mins, DEC );
  Serial.print( secs, DEC );
  Serial.print(" day, ");
  Serial.print( day, DEC );
  Serial.print(" date, ");
  Serial.print( date, DEC );
  Serial.print(" month, ");
  Serial.print( month, DEC );
  Serial.print(" year, ");
  Serial.print( year, DEC );



this what the module is outputting

time is: 34:49:66 day, 2 date, 5 month, 5 year, 0
time is: 34:49:67 day, 2 date, 5 month, 5 year, 0
time is: 34:49:68 day, 2 date, 5 month, 5 year, 0
time is: 34:49:69 day, 2 date, 5 month, 5 year, 0
time is: 34:49:70 day, 2 date, 5 month, 5 year, 0

I guess it has to do with the clock config, how do you go about configuring the module for your own time? I am a I2C newbie  :-? and I'm not making much sense of the address map below:

11  Forum 2005-2010 (read only) / Interfacing / Re: Sensirion SHT11 Temperature/Humidity Sensor on: February 08, 2007, 10:25:42 am
If you don't mind posting it, it would be useful, I have parked the sensor since so to have some use for it would be nice.  smiley
12  Forum 2005-2010 (read only) / Interfacing / Sensirion SHT11 Temperature/Humidity Sensor on: August 08, 2006, 07:24:57 am
Helloo, has anybody had any experience interfacing the module above with Arduino? the confusion lies on several points..

circuit schematic seems to be different on the Parallax data sheet and the actual Sensirion data sheet.

the coms protocol/sequences seem understandable although I don't speak C nor basic... but the maths doing the conversion from the temp & humidity readings to usable numbers seems to do extensive use of floats....

all comments / suggestions would be welcome.

many thanks,

Pages: [1]