Show Posts
Pages: 1 [2] 3 4 ... 12
16  Using Arduino / Sensors / Re: How to sense pool cue relative position? on: April 04, 2013, 06:55:47 am
I've given up with the ultrasonic sensor, I can't find a reasonable high-resolution/low-range sensor that works for me.

I'm considering a hall effect sensor (or an array of them) now. I may wrap a solenoid around the cue stick and place an array of sensors at short distance at its sides. It may takes some calibration but if things are done right I may be able to "sense" distance variations (which is my main concern, being the absolute distance not the point of it at all). I wonder if I will get consistent and usable measurements. Any hint in that direction is well appreciated :-)

17  Using Arduino / Sensors / Re: How to sense pool cue relative position? on: April 02, 2013, 09:30:13 am
The wooden cue's diameter is approx 3cm and Id like to achieve a 1mm resolution.

I'm trying an HC-SR04 ultrasonic distance sensor that I had at home (and never used before); it works with wooden fine but minimum distance is 2cm and resolution is poor.
I wonder if there are other cheap ultrasonic sensors around with higher resolution and lower range to play with.

The fact that ultrasonic sensors work with wooden is a plus I like :-)
18  Using Arduino / Sensors / How to sense pool cue relative position? on: April 02, 2013, 06:52:24 am
Hi everybody,
 I am trying to build a device that will measure and visually report a billiard cue's position relative to the ground table. It's meant to be an aid in correcting players' cue stroke. But I still don't know how can I sense the cue's poisition. Maybe you could help with some suggestions.

I thought about a device made of a base plate and two vertical plates within which the cue will move longitudinally.
The cue will move horizontally and vertically too, that's what interests me more. The horizontal and vertical movements are to be considered a mistake in player's stroke and have to be minimized in order to have a more precise stroke. That's why I want to measure it in some way and play a real time visual feedback to the the user while practicing.

See attached picture for details.
 
The cue stick is made of wood, and I'm willing to attach other stuff to it if needed (I'm thinking about metals, magnets, reflective stuff ...) by the measuring sensor. But I'm not going to brake open the cue, make the modification permanent and damage it.
 
Do you have any idea how can I approach this situation? I'm willing to consider different solutions. I'm open to any suggestion at the moment.
19  Using Arduino / General Electronics / Re: What does an EPROM chip do on a AGP VGA board? on: March 01, 2013, 03:20:41 am
I see, and it looks like a VGA BIOS may be modded and burned back into the chip on modern boards ... well, in old ones, like the one I started looking into, it's impossible since it's an EPROM and can't be burned again. Anyway, it's all clear to me now.
I'll keep reading about it, I wonder if that EPROM may be switched with something else, something one can customize ...
20  Using Arduino / General Electronics / What does an EPROM chip do on a AGP VGA board? on: February 28, 2013, 05:06:28 am
Just wondering what's the function of an HT27C512-70 EPROM chip on an old AGP nVidia Vanta VGA board. The board sports an nVidia Riva TNT2 processor. I wonder what's the use of an accessory EPROM chip. Just so, because I'm curious :-)
21  Using Arduino / Programming Questions / Re: What does abort() do? on: January 25, 2013, 12:10:40 pm
Users should not complain about the code they get. They are lucky to get anything at all.

Priceless!!! smiley-grin
22  Using Arduino / Programming Questions / Re: What does abort() do? on: January 24, 2013, 07:00:18 pm
If you do nothing special...

Code:
#include <assert.h>

void setup( void )
{
  assert( false );
}

void loop( void )
{
}

abort is called if the assertion fails.  stderr does not come into the picture.

That's all clear to me. That's how I already used it after you suggested it to me.
But ... that way, it does no more than calling abort(), right? Why should I even bother with calling assert() then? What's the point if it does'nt add anything new to the picture?
23  Using Arduino / Programming Questions / Re: What does abort() do? on: January 24, 2013, 05:35:45 pm

It could ... but I don't have the slightest idea of how to direct stderr to the serial ... so why bother adding this layer of complexity?
No, seriously, how may I define __ASSERT_USE_STDERR ? Do I get to redirect it to the serial channel? How?

Anyway, I find usefull that I can disable the assert() when I'm finished debugging, by simply defining NDEBUG once and for all.
That's cool to know :-)
24  Using Arduino / Programming Questions / Re: What does abort() do? on: January 24, 2013, 04:00:54 pm
Quote
I'm not going to write some crazy complex error handling routine for this particular purpose anyway, enough being to simply stop everything.
In CATIA, we have, occasionally, dialog boxes that pop up that say "Click OK to terminate", like someone would really want to.

The cause is almost always a result of failing to handle an exception. That sounds like what you are planning to implement.

I would strongly encourage you not to do that. Restarting the Arduino because of a type, or noise on the serial line, or some other strange input arriving is not a best practice. It's far better to simply ignore out-of-range data.

I completely agree with you, andI usually tend to spend quite some time on error handling. Especially because I'm not a professional programmer, so I'm going to use the code for myself, not for customers ;-)

In this case I'm going to use abort() in a preliminary stage of the coding. I'm not going to bother much about providing valid alternative default values in case the input is going to be unacceptable. It's ok to me if it runs an infinite loop. It doesn't break anything at the moment. But it's good to know what it does precisely :-)
25  Using Arduino / Programming Questions / Re: What does abort() do? on: January 24, 2013, 03:38:11 pm
setup() is running, and buffering serial data. Then, loop() starts and buffers some more. Before anything can get shifted out, you call abort(), which does what it's name suggests. It stops the program that is running, including interrupts (which are how the serial data gets shifted out).
That was quite precise and complete. Respect!

26  Using Arduino / Programming Questions / Re: What does abort() do? on: January 24, 2013, 03:36:38 pm

Code:
while ( true );

I see now!!! I've found it in stdlib.h :-)
Thank you anyway, I appreciate that. It's nice to know there's people like you out there :-)
27  Using Arduino / Programming Questions / Re: What does abort() do? on: January 24, 2013, 03:35:06 pm
It clearly has undesirable side-effects.  Why would want to use it?

I understand you care for others ... that's nice :-)
28  Using Arduino / Programming Questions / Re: What does abort() do? on: January 24, 2013, 03:33:28 pm
Btw, I was going to use abort() as a measure for halting the software in case totally unacceptable data were used as input.
I understand that's somehow drastic as an error handling method. I wonder how/if/when abort() maybe used such as that.

I'm not going to write some crazy complex error handling routine for this particular purpose anyway, enough being to simply stop everything.
29  Using Arduino / Programming Questions / What does abort() do? on: January 24, 2013, 03:22:28 pm
I don't get it, please help me out with this.

What does actually abort() do in Arduino? I don't find any related documentation.

If I upload this code into Arduino:
Code:
void setup() {
  Serial.begin(19200);
  Serial.println("Start");
}
void loop() {
  Serial.println("Start Loop");
  abort();
}>
I only get two dashes on the serial monitor, no "Start Loop" and even no "Start". It looks like not even setup() is running. Well, actually that's impossible, since something is "moving" on the serial line after all.

What am I missing?

30  Using Arduino / Microcontrollers / Re: Comprehensive ATtiny libraries overview? on: January 14, 2013, 06:01:31 pm
I'm working on a similar project, have you had success down-scaling your components?  I'm in the same boat, thinking the Atmega328p is overkill for this application.

No mate, I was distracted by my daily job, didn't have much time to spend on that. So I went on with a full flagged ATmega328.

But the idea is still in place. I really need to improve my programming skills though, before I can try and customize the libs like I want them to be. I still think recompiling OneWire and VirtualWire for ATTiny is doable, especially if I'm going to include strictly necessary code into them only. It's just that I'm still not the right person to do that, not yet at least.
Pages: 1 [2] 3 4 ... 12