Loading...
  Show Posts
Pages: [1]
1  Using Arduino / Project Guidance / Re: Wireless Arduino on: April 02, 2013, 02:41:40 pm
Hello Ana,

   I've put together some very detailed step-by-step tutorials for using Arduino's and xbees at this website: www.oneassetplace.com.  Specifically these two tutorials should help:  http://www.oneassetplace.com/pages/BuildingMeshControllerFirst  then http://www.oneassetplace.com/pages/BuildingMeshRemotesSecond

  They include links to Fritzing and the entire source code.

Best of luck!
Dave
2  Development / Other Hardware Development / Re: Arduino 1.0.1 causes Mac OS X to crash regularly. Ideas? on: April 01, 2013, 03:05:00 pm
Just an update:

  Not to be a "quitter" but I really had too much development to keep fiddling with the mac and I had a perfectly good Ubuntu linux PC sitting right next to it.  I've switched my Arduino development to that linux PC and I've had no problems.  Can plug and unplug Arduino's to my heart's content.

Dave
3  Using Arduino / Sensors / Re: Trigger level of water in a small glass tube on: March 21, 2013, 05:06:51 pm
Would this type of Proximity Sensor https://www.sparkfun.com/products/246 work for you?  I don't know if the water is opaque enough for it to sense it, but it is cheap enough to give it a try.

Best of luck!
4  Using Arduino / Programming Questions / Re: SdFat writes weird stuff to binary on SD on: February 20, 2013, 03:52:32 pm
Hey @Bi0H4z4rD can you clarify what your hardware problem was?

I've converted a program from SD to SdFat and the reading of a file is just fine, but always getting errors on the write... Just wondering if it might be related to your issue.

Thanks!
5  Using Arduino / Sensors / Re: Cannot read from TTL Camera on Mega, works fine on UNO on: February 05, 2013, 02:23:15 pm
@pylon and @Grumpy_Mike:  Thanks much for both of your input!!

I did get it working.  There were several things I had to do:

1) Use hardware Serial (Ended up using Serial2 on 16/17)
2) Ensure the camera serial code is AFTER the setting up the SD card step.  For some reason it never works if the code is before that
3) A bit of playing around with the responses and it is working now.

I think Pylon was right - the camera's initial "power on response" was coming before the mega was awake.

I did not end up having to control the camera with a digital pin.  Lucky for me because the camera wants 100mA.

For those of you with interest, I am opensourcing this motion-triggered/camera/sd/Ethernet code (currently the mega version is a work in process) on github at https://github.com/RalfieRoo/OAP_Arduino.

Thanks again,
Dave
6  Using Arduino / Sensors / Re: Cannot read from TTL Camera on Mega, works fine on UNO on: February 05, 2013, 07:41:27 am
Thanks much @pylon!  I do suspect some sort of timing issue as I remember I solved a sticky problem on the UNO with a simple delay(50).

Unfortunately, the camera manual (the parts that were translated to useful English  smiley ) simply implies: Turn power on then wait for this string...

I think I'll go with powering the camera with an output pin so I have more control over when those characters might arrive...

Thanks again and I'll post an update when I solve.
Dave
7  Using Arduino / Sensors / Re: Meas sensor reading on: February 04, 2013, 08:42:55 pm
Something like this should get you going:
Code:
int highestval = 0;
int val;
// Loop a few times and read the values, saving the highest
for (int i = 0; i<=100; i++) {
   val = analogRead(0);
   if (val >= highestval) {
       highestval = val;
   }
}

// Now output they highest value
Serial.println(highestval);

// Sleep and then do it again
delay(100);

You can play around with how many times you go in the loop - not sure if 100 is your number but you can probably figure that out.

Good luck,
Dave
8  Using Arduino / Sensors / Cannot read from TTL Camera on Mega, works fine on UNO on: February 04, 2013, 05:10:18 pm
Hello,

   I have a project where I am reading from a LinkSprite Serial TTL Camera and saving the image to an SD card.  I got this working on the UNO with an Ethernet shield.  I want to move it to the MEGA 2560 to give me more room to program.

  The problem is this:  Every time I connect the camera to the MEGA I seem unable to receive any serial data from it.  This small bit of sample code below will just hang forever (in the loop after "Waiting for camera init end") on the MEGA, but will work fine on my UNO.

I have tried several things including using SoftwareSerial on pins 50 and 51, and also using Mega's Serial2 on pins 16 and 17.  It just seems to be unable to receive from the camera on the MEGA.  Any explanations as to what the problem might be? Every time I switch back to the UNO it is fine...

Code:
/* Linksprite

Infrared Camera Test Code for MEGA.  This is meant to be a functional test of your camera and SD card only... To be used to verify your
circuit and board before you use oap_motioncamera_mega (which is the full Ethernet Shield, Motion Detector, and camera)
As such, you don't really need any of the motion detector connections outlined below


  Notes:
    Not all pins on the Mega and Mega 2560 support change interrupts, so only the following
      can be used for RX: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69

*/

#include <SoftwareSerial.h>
#include <SD.h>

int sdCardControlPin = 4;  // SD Card Control Pin

byte incomingbyte;
byte responseMessage[20]; // Used to hold responses

//SoftwareSerial(rxPin, txPin)
SoftwareSerial mySerial(5,6);                     //Configure pin (rx) and (tx) as soft serial port
// Try using MEGA serial 2 which should be: 17 (RX) and 16 (TX)

int i=0; // loop

void setup()
{
  Serial.begin(9600);
  //Serial2.begin(38400);
  mySerial.begin(38400);
  delay(25);
 
//  if (mySerial.isListening() )
 //   Serial.println("Camera is listening");
 
  // Wait for proper response from camera
  Serial.println("Waiting for camera init end");
  i = 0;
  while(i <= 15)
  {
    if (mySerial.available()>0) {
      incomingbyte=mySerial.read();
      responseMessage[i] = incomingbyte;
      Serial.print(responseMessage[i]);
      i++;
    }
  }
 
  // Did we get the expected response?
  if (responseMessage[0] == 0x36 && responseMessage[1] == 0x32 && responseMessage[14] == 0x0A) {
    Serial.println("Camera is initialized");
  }
  else
    Serial.println("WARNING: Camera not initialized"); 
 
  // Set up SD Card
  pinMode(sdCardControlPin, OUTPUT);

  if (!SD.begin(sdCardControlPin)) {
    Serial.println("  Card failed, or not present"); // don't do anything more:
    return;
  }
  Serial.println("SD Card initialized.");
     
}



void loop()
{
  Serial.println("Beginning Loop");
 
     Serial.println("Sleeping before taking another picture...");
     delay(5000);
     
}






Thanks!
Dave
9  Development / Other Hardware Development / Re: Arduino 1.0.1 causes Mac OS X to crash regularly. Ideas? on: February 01, 2013, 10:51:38 am
I am having nearly the exact same issue with my mid-2012 macbook.  My mac does a kernel panic randomly when I unplug the Arduino.  This is incredibly frustrating for development as it seems the only way I can reliably stop the code/serial monitor and upload a new version is to unplug the usb cable from the Arduino.  The Kernel Panic happens randomly somewhere between the 2nd and 10th unplugging of the Arduino.  Always on the unplugging.

Here is my environment:
macbook 2.7Ghz Core i7
OS X 10.7.5
Arduino 1.0.2
Boards: Happens when working with both UNO and MEGA boards

This is a serious bummer and I would appreciate any recommendations if anyone has solved this problem.

Thanks,
Dave
10  Using Arduino / Networking, Protocols, and Devices / Re: WiFi Shield + arduino uno, can't get it to work on: January 03, 2013, 05:22:51 pm
It took me a long time to get my Arduino and WiFly shield working also!  I did a three-part write-up and maybe this will help?

http://www.cc-logic.com/blog/posts/physical-computing-part-1-of-3-getting-wifi-working

Best of Luck,
Dave
11  Using Arduino / Networking, Protocols, and Devices / Re: Arduino official wifi shield on: December 14, 2012, 10:21:28 am
Hey Francesco,

   It can be rough getting the board working the first time.  I had very much luck following these steps outlined here:  http://www.sparkfun.com/tutorials/158  .

  Can you try that terminal program and let us know what type of responses you are getting?

Best of luck,
Dave
Pages: [1]