- This topic has 10 replies, 2 voices, and was last updated 2 days, 15 hours ago by
Angel LM.
-
AuthorPosts
-
In file included from C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl/grbl.h:43:0,
from C:\Users\Tolga\OneDrive\Masaüstü\grbl-1.0\grbl\examples\grblUpload\grblUpload.ino:27:
C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl/nuts_bolts.h:54:0: warning: “max” redefined
#define max(a,b) (((a) > (b)) ? (a) : (b))In file included from sketch\grblUpload.ino.cpp:1:0:
C:\Users\Tolga\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:93:0: note: this is the location of the previous definition
#define max(a,b) ((a)>(b)?(a):(b))In file included from C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl/grbl.h:43:0,
from C:\Users\Tolga\OneDrive\Masaüstü\grbl-1.0\grbl\examples\grblUpload\grblUpload.ino:27:
C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl/nuts_bolts.h:55:0: warning: “min” redefined
#define min(a,b) (((a) < (b)) ? (a) : (b))In file included from sketch\grblUpload.ino.cpp:1:0:
C:\Users\Tolga\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:92:0: note: this is the location of the previous definition
#define min(a,b) ((a)<(b)?(a):(b))In file included from C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl/grbl.h:43:0,
from C:\Users\Tolga\OneDrive\Masaüstü\grbl-1.0\grbl\examples\grblUpload\grblUpload.ino:27:
C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl/nuts_bolts.h:58:0: warning: “bit” redefined
#define bit(n) (1 << n)In file included from sketch\grblUpload.ino.cpp:1:0:
C:\Users\Tolga\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:124:0: note: this is the location of the previous definition
#define bit(b) (1UL << (b))In file included from C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl\grbl.h:43:0,
from C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl\gcode.c:22:
C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl\gcode.c: In function ‘gc_execute_line’:
C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl\nuts_bolts.h:58:19: warning: left shift count >= width of type [-Wshift-count-overflow]
#define bit(n) (1 << n)
^
C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl\nuts_bolts.h:63:36: note: in definition of macro ‘bit_false’
#define bit_false(x,mask) (x) &= ~(mask)
^~~~
C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl\gcode.c:852:118: note: in expansion of macro ‘bit’
if (axis_command) { bit_false(value_words,(bit(WORD_A)|bit(WORD_B)|bit(WORD_C)|bit(WORD_D)|bit(WORD_X)|bit(WORD_Y)|bit(WORD_Z))); } // Remove axis words.
^~~
C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl\spindle_control.c:118:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
spindle_set_state(uint8_t state, float rpm){
^~~~~~~~~~~~~~~~~
C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl\spindle_control.c:118:1: warning: conflicting types for ‘spindle_set_state’
In file included from C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl\grbl.h:59:0,
from C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl\spindle_control.c:26:
C:\Users\Tolga\OneDrive\Belgeler\Arduino\libraries\grbl\spindle_control.h:32:6: note: previous declaration of ‘spindle_set_state’ was here
void spindle_set_state(uint8_t state, float rpm);Hi Angel, Arduino gives warning like this when compiling and uploading. Stepper motors work but servo motor does not
Hi erolunal,
What model of servomotor are you using? How it is connected to the PCB?
I am using Tower Pro mg995 servo motor and connect it to PT1 on PCB
Ok, it’s the same one I use. I assume you have already tried connecting the wires by turning the connector 180 degrees.
Check, just in case, that the motor connector pins correspond to SIG, VCC, GND in that order. By the way, check also the state of the connector pins, to discard that it could be due to a bad contact.
Is the servo motor powered? There is 5V between the center pin of the PT1 pin set and the one closest to the edge of the board?
What Gcode are you using? These are the ones that I use to check the functionality:
M3 S900
– Open gripper
M3 S0
– Close gripper5v is coming to the center pin and edge pin of the PT1 pin. I’m typing the same Gcodes. Not working. The problem is most likely in the warnings above.
I installed the GRLB software on 3 different computers, it still gave the same error, the stepper motors work but the servo motor does not.
It goes to pin 41 on Arduino isn’t it the SIG pin of the servo?
Oh, my bad, my mistake. I forgot the most common problem in these cases. As you can see in the wiring diagram, the servomotor signal pin has to be connected to pin 7 of the Arduino (it is marked in another color).
When I designed the board, I made the mistake of thinking that pin 41 of the Arduino Mega could be used as PWM and it is not, so the solution is to unsolder from the Control PCB the pin that would be connected to pin 41 of the Arduino and instead solder a jumper wire to connect it to pin 7 of the Arduino.
I hope this solves the problem!
Thank you for your answers and your interest, I’m at work right now, I’ll try it tomorrow.
I plugged it into pin 7 and it worked. Thank you for your help.
I’m glad the problem has been fixed!
I will modify the documentation to make it clear how to make that connection and avoid more confusion in the future 😉
-
AuthorPosts
- You must be logged in to reply to this topic.