Grbl warning "#define bit(b) (1UL << (b))"

Hello Guys!
I have the problem that every time I try to Upload grbl on my arduino uno it puts out this warning


The Code also does not work I tried it on 2 Windows PCs and 1 Mac. Can anyone help me?

Can you please convey that in plain text for those that don't have Superman's eyes? Cut and paste text... also the entire error message please, not just one line...

Sry but I dont know how to find it but this is the code text wich I can see:

/***********************************************************************
This sketch compiles and uploads Grbl to your 328p-based Arduino! 

To use:
- First make sure you have imported Grbl source code into your Arduino
  IDE. There are details on our Github website on how to do this.

- Select your Arduino Board and Serial Port in the Tools drop-down menu.
  NOTE: Grbl only officially supports 328p-based Arduinos, like the Uno.
  Using other boards will likely not work!

- Then just click 'Upload'. That's it!

For advanced users:
  If you'd like to see what else Grbl can do, there are some additional
  options for customization and features you can enable or disable. 
  Navigate your file system to where the Arduino IDE has stored the Grbl 
  source code files, open the 'config.h' file in your favorite text 
  editor. Inside are dozens of feature descriptions and #defines. Simply
  comment or uncomment the #defines or alter their assigned values, save
  your changes, and then click 'Upload' here. 

Copyright (c) 2015 Sungeun K. Jeon
Released under the MIT-license. See license.txt for details.
***********************************************************************/

#include <grbl.h>

// Do not alter this file!

You posted it, then you deleted it. There should be a "copy" icon next to the error window...

Its the same as on the picture, this is the whole error line:

In file included from sketch\grblUpload.ino.cpp:1:0:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:124:0: note: this is the location of the previous definition
 #define bit(b) (1UL << (b))

The whole error line, or the whole error message?

Ah no sry I was wrong here it is:

In file included from C:\Users\felit\Documents\Arduino\libraries\grbl/grbl.h:43:0,
                 from C:\Users\felit\Documents\Arduino\libraries\grbl\examples\grblUpload\grblUpload.ino:27:
C:\Users\felit\Documents\Arduino\libraries\grbl/nuts_bolts.h:56:0: warning: "max" redefined
 #define max(a,b) (((a) > (b)) ? (a) : (b))
 
In file included from sketch\grblUpload.ino.cpp:1:0:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\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\felit\Documents\Arduino\libraries\grbl/grbl.h:43:0,
                 from C:\Users\felit\Documents\Arduino\libraries\grbl\examples\grblUpload\grblUpload.ino:27:
C:\Users\felit\Documents\Arduino\libraries\grbl/nuts_bolts.h:57:0: warning: "min" redefined
 #define min(a,b) (((a) < (b)) ? (a) : (b))
 
In file included from sketch\grblUpload.ino.cpp:1:0:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\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\felit\Documents\Arduino\libraries\grbl/grbl.h:43:0,
                 from C:\Users\felit\Documents\Arduino\libraries\grbl\examples\grblUpload\grblUpload.ino:27:
C:\Users\felit\Documents\Arduino\libraries\grbl/nuts_bolts.h:61:0: warning: "bit" redefined
 #define bit(n) (1 << n)
 
In file included from sketch\grblUpload.ino.cpp:1:0:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:124:0: note: this is the location of the previous definition
 #define bit(b) (1UL << (b))

Those are warnings. What are you worried about?

1 Like

As @aarg points out, just warnings.

What do you mean when you say the Code does not work? Are there real errors that keep you from uploading to the Arduino?

If not, what does the uploaded Code do that it shouldn't or not do that it should?

a7

When I type in the serial Monitor "$$" nothing shows up in the tutorial I saw there must show up some numbers the steppers also doesnt react.

Please post a link to where you are getting this code. And where you are getting your ideas about how to work it and what it is supposed to do.

The only thing I found googling as long as I was inclined to cannot be what you are working with.

TIA

a7

I Installed the normal grbl 1.1: GitHub - grbl/grbl: An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino

Is the baud rate set correctly in the serial monitor?

Oh I missed that, Im sorry for wasting your time :sweat_smile:

Meaning which, it works now, or it doesn't work?

It seems that it still does not work universal G-code says that its offline even though it recognize the COM3 port.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.