Show Posts
Pages: 1 2 [3] 4 5 ... 181
31  Using Arduino / Sensors / Re: Advice on a "matrix sensor"! on: September 21, 2014, 02:29:26 am
You have a 1 metre square area but how many matrix points do you need in this area?

Maybe using IR receivers set into the play area and each hexbug has a downward facing IR transmitter sending a different IR code.

Use an overhead camera on the pay area connected to a PC and some open source object tracking software. Put a different colour/pattern on each hexbot and allow the camera to track position.
32  Development / Suggestions for the Arduino Project / Re: RFM69W with Arduino Uno R3 on: September 21, 2014, 01:47:47 am
If you dig around on the LowPowerLabs site you will find most all the info you would need.
33  Development / Suggestions for the Arduino Project / Re: RFM69W with Arduino Uno R3 on: September 20, 2014, 12:02:39 pm
Low Power Labs stuff is meant to be quite good and they have a RFM69 library here with examples. Not sure about tiny compatibility though.
34  Using Arduino / Networking, Protocols, and Devices / Re: Wireless Module Serial UART I cant Enter AT- Command mode on: September 20, 2014, 07:25:11 am
5: PIN5 is the AT Control mode, Pull up to high or NC will make module
work as normal, When connect to low, it will enter the AT Command mode.
( High level enter AT mode) .
From this I cannot decide if the pin needs pulling to GND or to VCC.
35  Using Arduino / Programming Questions / Re: Converting code to Arduino Sketch on: September 20, 2014, 04:10:15 am
I re-arranged the code as shown below with connecting the encoder wires to pins A4 and A5 of arduino but after running ,  the sketch just stucked on serial monitor .

For me I find if you just print a very long string of characters without CR/LF to break it up the serial monitor & the Arduino IDE lock up.
Try using
36  Using Arduino / Sensors / Re: high resolution compass on: September 19, 2014, 11:00:40 am
What about this? 14 bit resolution so should surpass your needs assuming it's noise output is not to bad. They also do 12 bit versions but that's getting close to your limits so may be unsuitable.
37  Using Arduino / Project Guidance / Re: How to automate uploading a series of sketches on: September 19, 2014, 08:26:31 am
Turn on verbose output for upload in the Arduino IDE and capture the avrdude command line used to upload each sketch.
Then put them (with suitable delays) in a script.
Any reason you cannot combine all five sketches into one?
38  Community / Bar Sport / Re: Scotland Reveals Currency Plan on: September 19, 2014, 07:25:50 am
Interesting about Dundee - my wife is from Perthshire just next door, and there the vote was 60% "no".

At least I won't have to (pretend to) fight her deportation now.
Mine is from Glasgow and she wants to retire back there when the time comes despite the better weather down here.

Dundee gave the greatest yes percentage and that surprised me as I expected the west to be yes and the east no. Also the islands were an eye opener as I would have thought they are the most independent already. At least no Stornoway black pudding shortage or price hikes. 
39  Community / Bar Sport / Re: Scotland Reveals Currency Plan on: September 19, 2014, 06:45:38 am
Serious note: A huge amount of respect is due to both sides of the vote for the enormous turnout (in excess of 80%) - well done Scotland!
I don't know what it says for me and the people  (friends and family) I associate with in Scotland that they live in Glasgow, Dunbartonshire & Dundee (actually the ferry but close enough)  and they all voted Yes.
40  Using Arduino / General Electronics / Re: 'Reading' PWM duty cycle on: September 19, 2014, 04:59:52 am
Untested code and not very elegant but something like this...
// Interrupt variables
volatile unsigned long fall_Time = 0;                   // Placeholder for microsecond time when last falling edge occured.
volatile unsigned long rise_Time = 0;                   // Placeholder for microsecond time when last rising edge occured.
volatile byte dutyCycle = 0;                            // Duty Cycle %
volatile unsigned long lastRead = 0;                    // Last interrupt time (needed to determine interrupt lockup due to 0% and 100% duty cycle)

void PinChangeISR0(){                                   // Pin 2 (Interrupt 0) service routine
  lastRead = micros();                                  // Get current time
  if (digitalRead(2) == LOW) {
    // Falling edge
    fall_Time = lastRead;                               // Just store falling edge and calculate on rising edge
  else {
    // Rising edge
    unsigned long total_Time = rise_Time - lastRead;    // Get total cycle time
    unsigned long on_Time = fall_Time - rise_Time;      // Get on time during this cycle
    total_Time = total_Time / on_Time;                  // Divide it down
    dutyCycle = 100 / total_Time;                       // Convert to a percentage
    rise_Time = lastRead;                               // Store rise time

void setup() {
  Serial.println(F("ISR Pin 2 Configured For Input."));
  Serial.println(F("Pin 2 ISR Function Attached."));

void loop() {
  static unsigned long oldLastRead = lastRead;
  Serial.print("Duty Cycle = ");
  if (oldLastRead != lastRead) {
    oldLastRead = lastRead;
  else { // No interrupt since last read so must be 0% or 100%
    if (digitalRead(2) == LOW){
    else {

41  Community / Bar Sport / Re: Scotland Reveals Currency Plan on: September 19, 2014, 01:22:35 am
Darn it, I was hoping to pick up a cheap house/castle when the Scottish economy fell through the floor just after a yes vote. 
42  Using Arduino / Sensors / Re: Cheap Laser Distance Sensor on: September 18, 2014, 10:19:27 am
Have a look here
43  Using Arduino / Programming Questions / Re: TIMER2 ISR not working on: September 18, 2014, 10:06:21 am
    // enable Timer2 overflow interrupt: Setting the TOIE1 bit tells the timer to trigger an interrupt when the timer overflows
    //TIMSK2 = (1 << TOIE1);
    // enable timer compare interrupt:
    TIMSK2 |= (1 << OCIE2A);
Your enabling the compare interrupt and not the overflow interrupt.
TOIE1 should also be TOIE2 in the commented out section.

I use the below and it works okay.
// defines for setting and clearing register bits
#ifndef cbi
  #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#ifndef sbi
  #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))

  //Timer2 Settings: Timer Prescaler /8
  TCCR2A = 0;                                               // Timer2 Settings: WGM mode 0
  cbi(TCCR2B,CS20);                                         // Turn off CS20 bit
  sbi(TCCR2B,CS21);                                         // Turn on CS21 bit
  cbi(TCCR2B,CS22);                                         // Turn off CS22 bit
  sbi(TIMSK2,TOIE2);                                        // Timer2 Overflow Interrupt Enable   
  TCNT2 = CLK_SPEED;                                        // Reset timer
44  Using Arduino / Programming Questions / Re: Scan text and read on: September 18, 2014, 03:46:29 am
When you say 'read letter or words' how are they being read? Visually using a camera/scanner or typed on a keyboard/read from a text document. You heading says scan but is that using a scanner or something else?
45  Using Arduino / General Electronics / Re: Powering LEDs on: September 18, 2014, 03:25:01 am
Hi ! Normally how much current (mA) do I need for 1 LED to turn on ? If I give 1 A to 14 leds , will they burn ?
thanks in advance .
This all depends on the LED's your talking about. You really need to read the datasheet for the LED's to figure it out.
Pages: 1 2 [3] 4 5 ... 181