Show Posts
Pages: [1] 2 3 ... 981
1  Using Arduino / Installation & Troubleshooting / MOVED: Unable to setup Bluetooth on Yun on: Today at 08:39:50 pm
This topic has been moved to Arduino Yún.

http://forum.arduino.cc/index.php?topic=255568.0
2  Using Arduino / Project Guidance / Re: making an iphone app to cnontroll servos on: Today at 08:38:04 pm

Please do not cross-post.  Threads merged.
3  Using Arduino / Installation & Troubleshooting / MOVED: Arducam Problems on: Today at 08:34:07 pm
This topic has been moved to Programming Questions.

http://forum.arduino.cc/index.php?topic=267279.0
4  Using Arduino / Microcontrollers / Re: Light Dimming with ATtiny85 on: Today at 04:32:31 pm

The t85 is running at what speed?
5  Using Arduino / Microcontrollers / Re: ATtiny13 core dev board - need docs on: Today at 01:56:07 pm

My guess is that they are used to connect the processor to the programming port.
6  Using Arduino / Project Guidance / MOVED: Arduino Yun USB host on: September 15, 2014, 10:57:49 pm
This topic has been moved to Arduino Yún.

http://forum.arduino.cc/index.php?topic=266631.0
7  Using Arduino / General Electronics / Re: Switching Power Supply Plans? on: September 15, 2014, 05:12:20 pm

The vendor I use...
http://www.cui.com/
http://www.cui.com/catalog/power/ac-dc-power-supplies/external
http://www.cui.com/catalog/power/ac-dc-power-supplies/internal
(They also make a nice piezoelectric buzzer.)

Given the fact that you have not provided any details about power consumption I respectfully suggest that trying to build your own power supply is a bad idea.
8  Using Arduino / Microcontrollers / Re: Using OSC1 OSC2 as output pins on: September 15, 2014, 04:06:06 pm

Other thread removed.
9  Using Arduino / Project Guidance / Re: New Guy, is this feasible? Arduino as machine safety. on: September 15, 2014, 12:43:44 pm

Correct.
10  Community / Bar Sport / Re: Who hasn't accidentally touched a mains voltage once or twice? on: September 15, 2014, 03:50:58 am

I have.  Exactly once.  When I was very young, curious to know what was inside, I stuck a screwdriver into a wall socket.  To this day I can remember how painful and frightening it was.

That was, apparently, not enough to teach me the lesson.  When I was a few years older I tried lighting a small neon bulb by very carefully inserting the bare wires into a wall socket.  Rather than getting the desired effect, one of the wires worked its way across the socket and caused a short circuit.  A loud bang came from the socket quickly followed by a molten ball of wire.  Fortunately the molten wire missed my eyes.

That was enough to stop me from ever again being shocked by line voltage.

To really drive the point home, a coworker was nearly killed by 220V.  If your muscles tighten gripping the live wire it is impossible to let go.  In my coworker's case, he could not move at all.  In that situation, a quick death from a stopped heart would be a welcome exit compared to being frozen in place slowly cooking to death.
11  Using Arduino / Programming Questions / Re: Repetition of pseudorandom Random() sequence on: September 14, 2014, 02:22:03 am
Interestingly, I believe (some) games actually filter the random number output to make it "look random".

I believe there is a perfect simple algorithm for managing that problem.  It was presented in a Dr. Dobb's.  Argh!  I can't remember the name of it.  I'll report back later...
12  Using Arduino / Programming Questions / Re: Repetition of pseudorandom Random() sequence on: September 14, 2014, 02:17:55 am
I was making a bit of a joke.

Sorry about that.  I'm a bit distracted today.  Swapped my 15 year old truck for one with ... 3.4 miles!  Got pickup on the brain.
13  Using Arduino / Project Guidance / Re: New Guy, is this feasible? Arduino as machine safety. on: September 14, 2014, 01:59:33 am
Thank you sir. 

You are welcome.

Quote
Any idea what this code was originally written for?

You.

Quote
Not that it matters per say,  just might in my understanding of what its doing and how its doing it smiley

Should be doing exactly what you've described.
14  Using Arduino / Programming Questions / Re: Repetition of pseudorandom Random() sequence on: September 14, 2014, 12:09:52 am

Pseudorandom number generators are perfectly predictable so predictability is not the issue.

This is the issue...
http://dilbert.com/strips/comic/2001-10-25/

I'll use flipping a coin as an example.  If I flip a coin one million times and get heads one million times, is the coin fair?  It turns out, we can't tell.  The chances of one million heads from one million flips is extremely low.  But the chances are not zero.  That's the important part.  The chances are not zero.  With truly random numbers, every so often something freaky happens.  When a sequence fails a single statistical test, we cannot tell if the failure is because the sequence is low quality or because something freaky happened.  "Sometimes p happens" means that even truly random numbers occasionally fail a p-test.

Note: In general the above is true.  Some of the tests are designed to test for specific kinds of PRNG failures.  I suspect searching for RANDU will uncover a good example.  I believe the Libc random function always fails diehard_rank_32x32 and diehard_rank_6x8.
15  Using Arduino / Project Guidance / Re: New Guy, is this feasible? Arduino as machine safety. on: September 13, 2014, 11:46:34 pm

This should get you started...

Code:
typedef enum
{
  sInitialize,
  sMonitor,
  sDead
}
state_t;

static uint8_t state;

static unsigned long PreviousMicros;

static bool PreviousClock;
static unsigned short Clocks;

const float WAVELENGTH = (1.0 / 10000.0) * 1000000.0;
const unsigned long WINDOW = 2.5 * WAVELENGTH;

void setup( void )
{
  state = sInitialize;
 
  // Make A1 and A0 outputs
  bitSet( DDRC, DDC1 );
  bitSet( DDRC, DDC0 );
 
  // Ensure they start LOW (not necessary but documents our intent)
  bitClear( PORTC, PORTC1 );
  bitClear( PORTC, PORTC0 );
 
  // Make digital pin 8 (PB0) and input (not necessary but documents our intent)
  bitClear( DDRB, DDB0 );
}

void loop( void )
{
  unsigned long CurrentMicros;
 
  CurrentMicros = micros();

  // Count toggles of digital pin 8 (PB0)

  if ( bitRead( DDRB, DDB0 ) )
  {
    if ( ! PreviousClock )
    {
      ++Clocks;
      PreviousClock = true;
    }
  }
  else
  {
    if ( PreviousClock )
    {
      ++Clocks;
      PreviousClock = false;
    }
  }

  switch ( state )
  {
    // Wait for the first toggle
    case sInitialize:
      if ( Clocks > 0 )
      {
        // Go live
        bitSet( PORTC, PORTC1 );
        bitSet( PORTC, PORTC0 );
        // Monitor the clock signal
        state = sMonitor;
        Clocks = 0;
        PreviousMicros = CurrentMicros;
      }
      else
      {
        // Light an LED to indicate waiting?
      }
      break;
     
    case sMonitor:
      // Check each window for...
      if ( CurrentMicros - PreviousMicros >= WINDOW )
      {
        // No clock signal?
        if ( Clocks == 0 )
        {
          // Go dead
          bitClear( PORTC, PORTC1 );
          bitClear( PORTC, PORTC0 );
          state = sDead;
        }
        else
        {
          // Reset for another window
          Clocks = 0;
          PreviousMicros = CurrentMicros;
        }
      }
      break;
     
    case sDead:
      // Light an LED?  Sound an alarm?  Cry in your beer?
      break;
  }
}
Pages: [1] 2 3 ... 981