Show Posts
Pages: [1] 2
1  Using Arduino / Sensors / Re: PT100 sensor - help a beginner? on: June 29, 2013, 01:00:30 am
Yay, my sensor (finally!) arrived (that's what you get from ordering overseas via ebay...), and I got to play with it. I connected it straight to the analog pin of my arduino (well, "straight", I of course made a voltage divider for it, otherwise it wouldn't much make sense..) and run a program to read the values - and it worked!

Just to make sure, you connected it as one would connect any other thermistor? Care to post a sketch of what worked for you as a reference?

2  Community / Website and Forum / Re: Would it be possible to have tapatalk support? on: January 14, 2013, 04:00:21 am
I'd like to see support for tapatalk as well, it would make following/participating easier.
3  Using Arduino / Sensors / interfacing with tsc2046 on: September 03, 2011, 08:22:46 am
Hi, I am trying to interface with tsc2046 chip (connected to a resistive touchscreen) from an arduino via SPI. If someone has a piece of code for communication with the chip from an Arduino, can you post it here? Working, maybe working, pseudocode, anything.


Chip specs:
4  Forum 2005-2010 (read only) / Development / Re: Using the ATmega328 off of the Arduino on: October 18, 2010, 07:18:18 pm
also, check out this:
5  Forum 2005-2010 (read only) / Interfacing / Re: identifying a board from within a sketch on: October 27, 2010, 04:34:36 am

I'll have to see if writing to the eeprom survive a new sketch upload. If it does, it may be the easier/cheaper option.

Apparently it will.
6  Forum 2005-2010 (read only) / Interfacing / Re: identifying a board from within a sketch on: October 27, 2010, 03:56:23 am
Thanks, I'll look into this. Do you know any specific chip that does that for reference?

Actually, I found a bunch. Thanks again for the hint.|0&FS=True
7  Forum 2005-2010 (read only) / Interfacing / identifying a board from within a sketch [solved] on: October 27, 2010, 03:49:15 am
Hi, i have to deploy the same kind of board (an arduino clone based on 328p + several sensors) that is running the same sketch on about 20 locations. I collect data over (xbee) radio and serial lines.

Since i have to receive and classify data from quite a few sources, I'd like to be able to distinguish between particular physical boards in some (preferably hardwired by hardware) way.

Currently i have about two ideas:

1. Use a script that pre-generates some ID, modifies and recompiles the sketch on upload. use the ID in communicaton

pros: simple, easy to do
cons: way too easy to mismanage, laborious to detect error

2. use the radio module HW address
pros: seems to work well with xbee
cons: won't work in transparent mode, for serial connections, for alternative radio (e.g. BT).

As far as I can see, the atmega chip doesn't have a unique ID one can use.

Has anyone hit similar problem? How did you manage to solve it?

8  Forum 2005-2010 (read only) / Interfacing / Re: Arduino Mega and Rainbowuino v2.0 on: September 06, 2010, 07:30:14 am
: Expected signature for ATMEGA328P is 1E 95 0F

Isn't arduino mega a 1280 chip? maybe you should check your board type settings in the uploader program.


Sorry, I have misunderstood your problem.
9  Forum 2005-2010 (read only) / Interfacing / Re: Pushbutton. Why this code not working? on: September 03, 2010, 05:02:19 am
so, your loop pseudocode would be:


if ( buttonPushIsDetected ) {
   expire = millis() + interval;
       case 0: led6 on
       case 1: led6 off
       case 2: led7 on
       case 3: led7 off

if ( millis() >= expire ) {
   switch off 6
   switch off 7

No need to mix the logic of the button, and the logic of the expiring time, that just confuses things.
10  Forum 2005-2010 (read only) / Interfacing / Re: Pushbutton. Why this code not working? on: September 03, 2010, 12:14:13 am
I need what's on to go off after a set time if the button is not pressed earlier.

Can you explain what you want to do in simple pseudo-code? The way I read your explanation, you want something like this:

setup() {
  something = on
  countdown = millis() + COUNT_MAX

loop()  {

    if (button_press()) {
          countdown = millis() + COUNT_MAX

    if ( countdown <= millis() ) {
         countdown = millis() + COUNT_MAX
         something = !something


If that is what you want, compare each step of the pseudocode to your program and see where the code does something different.

As deSilva says, it is much easier to figure how to write your code when you know exactly what it is supposed to do at each step, and when you keep each step simple and clear.
11  Forum 2005-2010 (read only) / Interfacing / Re: PING ultrasonic sensor on: September 03, 2010, 01:17:23 am
Wii and PS remotes already instead of the IR sensors?

Wikipedia mentions that IR is used in Wii to detect which way it is pointing, not for position; apparently they use accelerometers for position.

You should research how these work in detail, I am sure there are a lot of references online.

As for reliability, inertial guidance systems are used on all sorts of self-propelled military projectiles. You'd thunk the military knows about reliability.
12  Forum 2005-2010 (read only) / Interfacing / Re: PING ultrasonic sensor on: September 03, 2010, 12:51:52 am
you say:
what is left is obtaining reliable and accurate position data
and also:
I figured ... gyros

if you are going to have gyros on the camera platform, won't something like dead reckoning ( be good enough to determine your position? you mention you won't do it online, so you only have to record the gyros data stream somewhere and use it for calculation later.

if you use ultrasound sensor, what would be your frame of reference to determine the position? i think with the gyro information you'll probably track position better than ultrasound.
13  Forum 2005-2010 (read only) / Interfacing / Re: Not another stepper motor on: August 31, 2010, 04:26:03 pm
Continuous stepping is pretty easy with the arduino library.

My first program (I drive a telescope attached in front of the camera, for the schematic of how to use a ULN2003 see the Arduino Stepper library example, I'm using unipolar steppers and control each motor with a keypad of five buttons instead of a pot) works like this:

1. You define control variables, and setup your motors with some defaults (the variable definitions should go above the setup() block so that they are visible to the whole program):

s1direction = 1;
s1speed = 50; // steps per minute
s1 = Stepper(s1speed, pin1, pin2)

same for as many steppers as you need
s2 = ...

2. You define a function that has the motors perform single step

void makeSingleStep() {
  // ... many more :) I use three
  // ...

The direction flag variables (sXdirection) hold either 1 or -1, depending on which way you want your motors to go.

3. You write some code to quickly process your control events - this depends on what you use for input.

This function needs to do two things, fast:

 - read input responsible for direction and speed for each motor
 - set the corresponding control variables (steps per minute and direction) for each motor

4. In your loop, you combine the above stuff like this:

void loop() {
   // read inputs, make necessary input processing calculations

   // set direction and speed flags for the stepper objects
   // this can be combined with the one above
   // you also do setSpeed(newSpeed) for each motor here

   // make motors run one step

   // loop until last_step_time in the Stepper library overflows

This approach worked quite well for me so far. I read simple digital buttons for control, so no complex analog calculations. Takes lots of pins though. (The real reason I am using buttons is I prefer fine control over speed, and I find discrete changes easier than turning a pot ... and I had no suitable pots when I wrote the program.)

Potential problems:

I haven't looked into the Stepper library. You should take a look and make sure there isn't something that's going to overflow after a while. I haven't used mine for over 30 or 40 minutes at a time, so I haven't had issues, but who knows.

Hope this helps

Edit: okay there is a
long last_step_time
used in the stepper library which is set to millis(), and will eventually overflow, but it should be some days of operation before that happens. resetting the board should give you more days.
14  Forum 2005-2010 (read only) / Interfacing / Re: analog readings go up w/o reason after few hours on: August 31, 2010, 04:44:23 am
turns out the problem was a bad connection somewhere in my soldering, not related to the sensor, or to the ardweeny.

the dog fixed it once accidentally by brushing against the device, re-soldering seems to have fixed it completely.

thanks again for the help.
15  Forum 2005-2010 (read only) / Interfacing / Re: analog readings go up w/o reason after few hours on: August 30, 2010, 04:24:12 pm

In this case, however, there's no confusion as to the kind of sensor. Also, I am looking for clues to the possible source of the error, not a replacement sensor.
Pages: [1] 2