Welcome! Log In Create A New Profile

Advanced

Repetier-Firmware changes to add button

Posted by dr.shirota 
Repetier-Firmware changes to add button
May 20, 2014 09:43AM
Hello, everyone!

First of all I'd like to introduce myself, as this is my first post in this forum:
I'm a Mechanical Engineering student and I'm building a Reprap for my uni. I've read through a whole lot of posts on multiple forums for like 2 days, but I couldn't find an answer to my question.
My plan is pretty simple though, I think:

I would like to connect a switch/button or similar to the RAMPS in order to for example pause a print when filament is empty (which the switch would recognize).
What I've done so far is to change the following lines in "uiconfig.h", saved the changes and uploaded the firmware to the Arduino.

#define UI_HAS_KEYS 1 //(used to be 0)
UI_KEYS_INIT_BUTTON_LOW(43); //(added this line)
UI_KEYS_BUTTON_LOW(43,UI_ACTION_EMERGENCY_STOP); //(added this line)


The switch consists of a voltage divider like this: GND (AUX4)----switch----o----------1k-resistor---------5V (AUX4)
|
|
PIN 43 (AUX4)

Also, I tried this configuration: GND----1k-resistor------PIN 43 ( pin 43 is not connected at the start, I manually connect the wire at some point during the print, just like closing the switch)
Both configurations can be seen in the pictures attached.

After uploading, the printer works fine, prints objects just like before the changes I made.
But when I push the switch that pulls pin 43 to LOW (measured the signal), nothing happens. The printer just keeps going instead of doing the EMERGENCY STOP.

I think I did all I need to do according to the firmware installation guide.
What's the mistake I'm making here?

My Printer:

Prusa i2
Repetier-Host 0.90C
Repetier-Firmware (don't know what version now)
Arduino Mega 2560 (IDE 1.0.3)
RAMPS 1.4

Thx in advance for every answer, most appreciated!!!
Attachments:
open | download - 800px-Arduinomega1-3connectors button.png (249.2 KB)
open | download - 800px-Arduinomega1-3connectors button 2.png (250.8 KB)
Re: Repetier-Firmware changes to add button
June 14, 2014 01:07PM
i would use that resistor in series to prevent damage of the channel that runs those pins.


are you using an lcd display. the lcd menu needs to be enabled in configuration.h to assure pin polling

in configuration.h what the emergency stop does is defined
Re: Repetier-Firmware changes to add button
June 26, 2014 04:06AM
Hey,

sorry I haven't checked in a while.
I don't use an LCD.

In confiduration.h, I cannot see anything related to EMERGENCY_STOP...What did you mean then?

Can anyone tell me if something is wrong with what I described in my first post from May 20?

Cheers
Sorry, only registered users may post in this forum.

Click here to login