- This topic has 10 replies, 2 voices, and was last updated 1 year, 7 months ago by Angel LM.
-
AuthorPosts
-
May 21, 2023 at 2:40 pm #2164
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
May 21, 2023 at 8:53 pm #2165Hi erolunal,
What model of servomotor are you using? How it is connected to the PCB?
May 22, 2023 at 11:51 am #2166I am using Tower Pro mg995 servo motor and connect it to PT1 on PCB
May 22, 2023 at 8:29 pm #2167Ok, 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 gripperMay 22, 2023 at 9:11 pm #21685v 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.
May 22, 2023 at 9:15 pm #2169I installed the GRLB software on 3 different computers, it still gave the same error, the stepper motors work but the servo motor does not.
May 23, 2023 at 12:55 am #2170It goes to pin 41 on Arduino isn’t it the SIG pin of the servo?
May 24, 2023 at 8:13 pm #2171Oh, 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!
May 24, 2023 at 8:29 pm #2172Thank you for your answers and your interest, I’m at work right now, I’ll try it tomorrow.
May 27, 2023 at 6:21 pm #2174I plugged it into pin 7 and it worked. Thank you for your help.
May 28, 2023 at 3:14 pm #2175I’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.