Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 12
61  Using Arduino / Programming Questions / Re: Filtering an Integer array of mixed 'characters' and numbers on: August 07, 2012, 02:32:41 pm
Thanks CrossRoads that link's really useful - I keep it for future reference. 

It is more sensible to go for separate arrays for chars and data. Then I could use other data types as well.

cheers
62  Using Arduino / Programming Questions / Re: Filtering an Integer array of mixed 'characters' and numbers on: August 07, 2012, 02:28:54 pm
Na migo thisaway!  smiley-wink

Thanks for the input PaulS.

I'll go with separate arrays.

Cheers


63  Using Arduino / Programming Questions / Filtering an Integer array of mixed 'characters' and numbers on: August 07, 2012, 02:14:29 pm
Hi,

I have an integer array which is a mixture of characters and integer numbers (the numbers and characters could be any value - this is just an example):

Code:
int Array1[]  = {'s',250,'w',10,500,'p',15 };

I want to separate out the numbers and characters into two arrays. One of characters, and one of the integer numbers to get result:

Code:
ArrayChars[3] ...contains... {'s','w','p'}
ArrayIntNums[4] ...contains...{250,10,500,15}

The characters are commands and the numbers are data for a command. So for example {'s', 250} means "set speed to 250"

I don't even know if it is possible and I may have to store the numbers and characters in separate arrays. I think one main problem might be that some numbers and characters are interchangeable (eg 's' is also 115 and visa-versa in decimal)

Can anyone point me in the right direction?

Many Thanks

64  Topics / Robotics / Re: Confused about classes of RC LiPo batteries on: July 31, 2012, 03:32:52 am
Excellent link and example Thanks dxw00d! Now I get it.
65  Topics / Robotics / Confused about classes of RC LiPo batteries on: July 31, 2012, 03:18:48 am
Hi,

I am shopping around for a LiPo batteries for a robot. I found the classification of batteries confusing. I understand that higher mAh means they may last longer between charges, and that has a fairly clear definition in the Physics. Higher S rating means more cells (eg 3S = 3 cells, I think).

But I don't understand the 25C, 35C, 70C classification. I believe higher 'C' means greater rate of power delivery. So eg you can have greater acceleration in an RC car with battery 35C than 25C. What does C stand for? What is lacking is a scientific explanation, maybe a relationship between 'C' value and watts per sec ? or a quantity such a peak power (watts), or peak current with a time limit (like you get for some electronic components).

Anyone able to point me in the right direction on a tutorial / website / explain.

Many Thanks

66  Development / Suggestions for the Arduino Project / Re: Total rewrite of the Arduino App needed! on: July 03, 2012, 02:27:11 pm
Quote
Perhaps you should try the AVR Studio C approach and then you won't have to deal with Arduino IDE.

I agree with the above quote. If you love to sound like an expert it's easy to knock stuff that helps get beginners and non-programmers of the ground (like me). If you don't like Arduino just use the available tools out there you do like. It's obvious that the Arduino environment is improving and people want to listen or else this forum section wouldn't exist. So go ahead and rewrite the Arduino IDE and all my sketches too (and alot of other peoples) that probably wouldn't work in your new personalized version  smiley-razz
67  Using Arduino / Sensors / Re: does anyone own this temperature sensor? on: June 13, 2012, 05:03:14 am
Arduino is C so you can use this. It's old (1988) but I find it useful being new to C programming.

Also you can download it free as PDF.

http://net.pku.edu.cn/~course/cs101/2008/resource/The_C_Programming_Language.pdf

cheers
68  Using Arduino / Sensors / Re: does anyone own this temperature sensor? on: June 11, 2012, 02:47:05 pm
I don't have this one, but you can easily get 3 data points.

1st you have your fever thermometer. These are usually quite good, because it's important to know if somebody might die (or not) of a fever  smiley-eek:

2nd get some ice and cold water. The triple point of water is 0 deg C (it's the point at which all three states of water exist, not the freezing point of water). So if ice and water (and the water vapor you can't see) exist at low altitude, after some time to allow equilibrium , you have 0 deg C. Could check wikipedia for effect of altitude etc.

I'm sure you know that water boils around 100 deg C. There is your 3rd data point.

OK there will be some error - you may not be at STP and the water may not be pure.

Hope it helps. That's how I check mine anyway, assuming the response is linear (ish) over the range.


The other factor I found was the supply voltage to the temperature sensor device.  So you can get different scaling factors at different voltages eg 3.3 vs 5v. But you can check that using the constants above.

Sensors can be sensitive to RF interference. I was using one of mine near my computer and it's WiFi router = lots of noise. Ok, I switched off the router, shortened the cables and wrapped the sensor cable in aluminum foil = much less noise.



Cheers
69  Topics / Device Hacking / Whistle and Wag! Fun hack for whistle and find device. on: June 10, 2012, 11:54:10 am
These devices have a small led that flashes and a beep when you whistle. I had one left over knocking about the house, so I wanted to find a use for it. They are about 3 x 3 x 1.5 cm and run off a couple of button cells. You don't need to use the plastic whistle to work it, you can use purse your lips and do it yourself - needs to be loud though.

http://www.amazon.com/Whistle-Locator-Stereo-Remote-Control/dp/B000ODQ7EQ

I hooked one up to flash onto an LDR so when you whistle a signal goes via analogue pin to start a servo and wag a piece of wire. Easy way to add an interactive
wagging tail to your robot! The LED is placed right next to the LDR and the whole lot is shaded from ambient light.

Video:
http://youtu.be/IUX5InVw5aU

Code:

Code:
Servo myservo;
int wag = 0;
int pos;
//PhotoResistor Pin
int lightPin = 0;

int servopin = 7;   //the pin the servo is connected to
                  
void setup()
{
  pinMode(servopin, OUTPUT); //sets the servo pin to output
  digitalWrite(servopin, LOW);  //servo OFF
  myservo.attach(7);
  myservo.write(90);
  Serial.begin(9600);
}
 
void loop()
{
 int lightLevel = analogRead(lightPin); //Read the
                                        // lightlevel

if (lightLevel > 450)
 {
   wag = 1;
 }
 
 if (wag == 1)
 
 {
  
   for (pos = 0; pos < 180 ; pos +=2)
   {
  
  
   myservo.write(pos);
  
  Serial.println(lightLevel);
   }
  
 }
 
 

}

I put in serial for debugging. You need to play around with what light level you need to trigger the wagging. Also your LDR may vary from mine. See video.

Would welcome some feedback for improvements, additional actions etc..

Cheers
70  Using Arduino / Sensors / Re: NewPing (Ultrasonic) Library for HC-SR04, SRF05 and SRF06 sensors - v1.3 on: June 10, 2012, 09:40:47 am
Many thanks for doing this.

I was researching which sensors to buy.

NewPing v1.3 came just in time to help me make the right decision.

Cheers
71  Topics / Robotics / Re: Airsoft turret - Arduino controlled - demo on: June 08, 2012, 05:44:13 am
I would like to build a similar camera and BB gun combo. So it's a great help you posted this! Thanks smiley

You say you are using hobby servos, which ones specifically so I can look up datasheet?

I plan to put mine on a robot rover controlled by a Dell mini web-book. To save on costs I'm using jeelabs RF12 modules which have a 100m range for rover control, however the IP camera can be operated over the Internet wherever there is a wireless connection.

I'm using storageoptions day-night IP camera with motion sensor and a low power laser to aid sighting remotely. The bb gun will be a an UZI style electric SMG for remote mobile-mayhem!

Thanks again
72  Using Arduino / Sensors / storage options day-night IP camera on: June 08, 2012, 05:14:28 am
Following on from this thread:- http://arduino.cc/forum/index.php/topic,53498.0.html I bought a storage options day-night IP camera from Maplin (UK) for £56. Excellent value. Lots of functionality see:- http://www.storageoptions.com/products/ip-cameras/indoor/ip-camera Including motion alarm and night vision!

My only criticism is that support a bit poor especially zero support for so called advanced use of the motion sensing alarm output, which I guess is the one some arduino users would want to use. I know I did. However they do say up-front they don't support advanced use. But I though at least they could tell us what each of those terminal on the back are for!

Anyway after contacting storageoptions and getting nothing. I went on and worked it out so I thought to post an example in case anyone else wants a go!.

Please see picture (IPcam.jpg) and sketch below.

IPcam.jpg is a drawing of the green I/O screw terminals on the back of IP camera. Wire up according to that and just follow the camera's manual for setup of alarms in the camera software.

Code:
const int IPalarm = 6;      // the number of the IP camera INPUT pin
const int ledPin = 4;      // the number of the LED pin to attach led with 560 ohm resitor
char flag1 = ' '; // char to store alarm data

void setup () {
 
// setup the arduino pins
  pinMode(IPalarm, INPUT);
  digitalWrite(IPalarm, LOW);

  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, LOW);


}

void loop () {
 
  if (digitalRead (IPalarm) == HIGH) // if IP camera alarm activated set flag1 to 'i'
   
   {
     
     flag1 = 'i';
   }
 
    switch (flag1) { // action according to flag1 (using switch case because I am using lots of different values of flag1 in a bigger project)
// could just use if... else

    case 'i': //IP motion alarm was triggered
      digitalWrite(ledPin, HIGH);
      break;
   
    default:  // No alarm
      digitalWrite(ledPin, LOW);

    }// end of switch case

}


I hope it's useful to others.

Cheers

73  Topics / Robotics / Re: Arduino Rover Rocket Launcher on: June 04, 2012, 05:12:43 am
Hi

Great project.

I am just starting something similar and will definitely use your website for guidance. Due note also taken about safety when arming rockets from cyberteque.

 I am using ROBOT BASIC running on an old DELL inspiron mini web-book. I found it really easy to get ROBOT BASIC (RB) to communicate commands to the arduino and then send-and-recieve commands using RF12 modules from jeelabs. RB makes it really easy to make a GUI on the DELL for the Robot control.

I am using an IP camera with the cams software running on the Dell too via a small portable WiFi router -gaffer-taped to the dell smiley. That makes the video system self-contained and I don't need to worry about it.

I'm getting ~120m range in line of sight with RF12 control. The IP camera spec says about 100m range is possible @2.4GHz. RF12 @868MHz. Not getting any interference.

I'll post it up when I get a good working version. What do people think of ROBOT BASIC for people starting out in this arena anyway? 

cheers
74  Using Arduino / Sensors / Re: Big Red Button on: May 21, 2012, 04:42:48 am
An alternative might be to use a missile cover style of switch. They are cool too  smiley-cool see this link

http://www.maplin.co.uk/missile-style-toggle-switch-cover-37319?c=froogle&u=37319&t=module
75  Using Arduino / Networking, Protocols, and Devices / Re: Like the look of Jeenodes on: May 16, 2012, 09:08:16 am
Hi John thanks for that,

That's extra info that's very useful. I think I'll go ahead now and get some. I'll post progress, especially if I get into trouble  smiley

I also joined this forum and got some useful stuff.

http://forum.jeelabs.net/forum

Cheers

Edit: I didn't immediately think to look at the Radio datasheet separately, but I found links and, as you said, it gives me the features I need.

http://www.sunrom.com/files/RFM12B.pdf and http://www.hoperf.com/upload/rf/RF12B.pdf

Quote
..features
Wakeup timer
• 2.2V – 3.8V power supply
• Low power consumption
• Standby current less than 0.3uA

0.3uA is low enough for me!
Pages: 1 ... 3 4 [5] 6 7 ... 12