Welcome! Log In Create A New Profile

Advanced

Sanguino's EXT pins doesn't work [SOLVED]

Posted by gege2b 
Sanguino's EXT pins doesn't work [SOLVED]
January 25, 2012 12:17PM
Hi all

I'm new to reprap. I've built a Prusa mendel, she's running fine (she still needs some tweaking, anyway)

I would like to use this : [eclecti.cc] to do some controled timelapse

As of now :
- Sprinter is patched (folowing the instruction on this website) to respond to M240 commands
- Skeinforge plugin is activated
- my electronic is OK (my camera is triggered when I put 5v manualy on his input).

Anyway, it seems that the A0..A4 on my sanguinololu isn't responding at all, even if I send M42 S255 P37 (or whatever pin number in the range)

I have no idea of the problem... please, can you help me ?

Gege

Edited 1 time(s). Last edit at 02/03/2012 01:23PM by gege2b.
Re: Sanguino's EXT pins doesn't work
January 27, 2012 05:42AM
Hi,

So, after some tests :
- I've tested the normal sprinter (without any mod except the common configuration)
- none of the EXT pin seems to work with the M42 command
- I checked fuses on the ATMega and they seems OK to me (but I'm not sure : lfuse: 0xff, hfuse : 0xdc and efuse : 0xfd)
- SD Support is disabled so that cannot conflict in any way

Oh, and :
- My english is so bad, sorry for that ^__^

well, it just not work as excpected but I can't figure out why, someone have an idea ?

Thanks

gege
Re: Sanguino's EXT pins doesn't work
January 30, 2012 02:00PM
hi,

no one have an idea ?
I've made lot of search, but I still don't understand why this isn't working :/

thanks
Re: Sanguino's EXT pins doesn't work
February 03, 2012 11:59AM
Hi

There some news (even if it doesn't work yet)

I have confirmation that the sanguino receive the command and react to it, it run into the code that is supposed to switch the pin, but still nothing sad smiley

Here's the code into (truncated here, but all is at the good place ^_^ )
I even tried to replace the WRITE() wrapper with the original digitalWrite() function, same problem...


#include 

(...)


#ifdef PHOTOGRAPH_PIN
#if (PHOTOGRAPH_PIN > -1)
  SET_OUTPUT(PHOTOGRAPH_PIN);
  WRITE(PHOTOGRAPH_PIN, LOW);
#endif
#endif

(...)

      case 240: // M240
        // Triggers a camera by emulating a Canon RC-1 Remote
        // Data from: [www.doc-diy.net]
        // modified to use wired remote

       #ifdef PHOTOGRAPH_PIN
        #if (PHOTOGRAPH_PIN > -1)
        #define NUM_PULSES 1
        #define PULSE_LENGTH 800

        for(int i=0; i < NUM_PULSES; i++) {
          Serial.println("Doh !?");
          WRITE(PHOTOGRAPH_PIN, HIGH);
          _delay_ms(PULSE_LENGTH);
          WRITE(PHOTOGRAPH_PIN, LOW);
          _delay_ms(PULSE_LENGTH);
        }
        #endif
        #endif

       break;

Please, I would greatly appreciate some help, as I plan to use some other EXT pins to power on/off my prusa...

Thank you
Re: Sanguino's EXT pins doesn't work [SOLVED]
February 03, 2012 01:22PM
Well, it's the last message I'll post here.

I finally get it working !!!

Shame on me... I was using the µC digital output numbering, instead of analog input numbering... All is OK now !!
Sorry, only registered users may post in this forum.

Click here to login