I don't know what I'm doing

By the way, I really appreciate all the help on this.

1 Like

Ok, so in the IDE when I go to a new sketch and go to file - examples - grbl - grbl Upload
this is what populates into the sketch:
#include <config.h>

#include <coolant_control.h>

#include <cpu_map.h>

#include <defaults.h>

#include <eeprom.h>

#include <gcode.h>

#include <grbl.h>

#include <jog.h>

#include <limits.h>

#include <motion_control.h>

#include <nuts_bolts.h>

#include <planner.h>

#include <print.h>

#include <probe.h>

#include <protocol.h>

#include <report.h>

#include <serial.h>

#include <settings.h>

#include <spindle_control.h>

#include <stepper.h>

#include <system.h>

/***********************************************************************

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!

Okay good. I think this is where you want to be. One thing I’m noticing with the video that’s a potential discrepancy is that I think you probably want to pick Nano instead of Uno for the board type. Other things at first glance look fine from the video.

The sketch I had copied and pasted above was selected for Nano. I had tried both because I was unsure which chip I had but also had originally thought it was Nano.

I’m noticing that the notes say grbl only supports 328p based Arduinos. Could it be possible that I bought a laser with a chip that is not supported?
Also, when I run LB and use the locator button it shows at is connected and text pops up in the consul but nothing moves unless I press the button on the laser that powers the laser and the motors, it moves at that point but the laser is constantly on. I don’t think this is causing issues with the flash and I think it is due to the unsupported firmware.

From memory I believe Eleksmaker boards are 328p based and as far as I know Benbox only runs on 328p Arduino based boards. But I could be off.

Well just to confirm, you don’t have LightBurn on while attempting the burn do you? If so, it could be LightBurn contending on the port. You should close LightBurn in that case.

1 Like

I did have it on but I just completely logged out unplugged the laser and restarted my computer. I made sure the only thing open was the IDE and it was showing the laser port and Arduino Nano connected. Still getting these error codes:
“Required HOMING_CYCLE_0 not defined.”
#error “Required HOMING_CYCLE_0 not defined.”
^~~~~
/Users/Daddy/Documents/Arduino/libraries/grbl/grbl.h:108:4: error: #error “WCO refresh must be greater than one.”
#error “WCO refresh must be greater than one.”
^~~~~
/Users/Daddy/Documents/Arduino/libraries/grbl/grbl.h:111:4: error: #error “Override refresh must be greater than zero.”
#error “Override refresh must be greater than zero.”
^~~~~

exit status 1

Compilation error: exit status 1

Can you confirm you’re using the grbl folder from within the download zip file from LightBurn site?

I think that may be the issue, I followed the link from the LightBurn YT video for installing clean GRBL firmware which took me to a google drive download. I downloaded from the link but I never had to unzip anything and I didn’t see a .zip file in the folder I downloaded. Also, when I tried following the add library instructions on the IDE it didn’t look the same as the YT video, it looked like it just took me to my file browser and gave me “open” or “cancel” options, where the video had a “choose” option.
Do I need to try and see if I can get that library removed and start over?

So, what I ended up doing was compressing the grbl folder to a .zip so that the Arduino IDE would allow me to add the library. But the video specifically said to use the unzipped folder. When I tried that it never gave me the option to “choose” it, just “open/cancel”.

Okay. So I went through the process to make sure I could see what you’re talking about.

I think it’s likely that you’ve installed Version 2 of the IDE rather than the legacy IDE. The website is tricky about this as all downloads default to Version 2. You need to scroll to get to the legacy IDE to download.

Using this should match the steps in the video more evenly. I’d suggest uninstalling the existing version before reinstalling.

You probably want to clean-out the Arduino folder in your Documents folder that’s created as well.

Ok, thank you for all your help with this. I’ll give that a try this morning.

@berainlb can correct me if I’m wrong here, but the first link is a .hex file. You should be able to upload it directly with avrdude…

I keep seeing compile errors and the first link is to a file that is ‘up-loadable’ as is, no compilation required.

The current IDE for Arduino is 2.0 something… that’s what’s running on my machine.

:smile_cat:

It is. And this can be done. But a little reluctant to encourage this if he’s uncomfortable with command line.

I went through the steps and didn’t get compile errors. It should work without issue following the steps.

It is indeed the current version. However, the video instructions are based on 1.X line which is complicating things here as steps are slightly different. It’s odd that 2.X has lost functionality in how it can add new libraries, though, as it insists on a zip file instead of also allowing folders.

Ok, Downloaded the 1.8.19 version and the error code is:
Arduino: 1.8.19 (Mac OS X), Board: “Arduino Nano, ATmega328P”

In file included from /Users/Daddy/Documents/Arduino/libraries/grbl/config.h:30:0,
from /Users/Daddy/Documents/Arduino/libraries/grbl/examples/grblUpload/grblUpload.ino:1:
/Users/Daddy/Documents/Arduino/libraries/grbl/grbl.h:68:4: error: #error “Required HOMING_CYCLE_0 not defined.”
#error “Required HOMING_CYCLE_0 not defined.”
^~~~~
/Users/Daddy/Documents/Arduino/libraries/grbl/grbl.h:108:4: error: #error “WCO refresh must be greater than one.”
#error “WCO refresh must be greater than one.”
^~~~~
/Users/Daddy/Documents/Arduino/libraries/grbl/grbl.h:111:4: error: #error “Override refresh must be greater than zero.”
#error “Override refresh must be greater than zero.”
^~~~~
exit status 1
Error compiling for board Arduino Nano.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

I tried to load the library but it told me “a library named grbl already exists” I don’t know how to remove a library that I have added in IDE, but I am almost positive that is the problem. How do I delete it so that I can start over?

Alright, went to Arduino Support FAQs page and found instructions for removing the library. Got it removed, added the library again and tried the upload once more. Copied error codes (Same as before, will try to download the library from the google drive again and start completely fresh):
Arduino: 1.8.19 (Mac OS X), Board: “Arduino Nano, ATmega328P”

The sketch name had to be modified.
Sketch names must start with a letter or number, followed by letters,
numbers, dashes, dots and underscores. Maximum length is 63 characters.
In file included from /Users/Daddy/Documents/Arduino/libraries/grbl/config.h:30:0,
from /Users/Daddy/Documents/Arduino/grbl_flash/grbl_flash.ino:3:
/Users/Daddy/Documents/Arduino/libraries/grbl/grbl.h:68:4: error: #error “Required HOMING_CYCLE_0 not defined.”
#error “Required HOMING_CYCLE_0 not defined.”
^~~~~
/Users/Daddy/Documents/Arduino/libraries/grbl/grbl.h:108:4: error: #error “WCO refresh must be greater than one.”
#error “WCO refresh must be greater than one.”
^~~~~
/Users/Daddy/Documents/Arduino/libraries/grbl/grbl.h:111:4: error: #error “Override refresh must be greater than zero.”
#error “Override refresh must be greater than zero.”
^~~~~
exit status 1
Error compiling for board Arduino Nano.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

Fresh download from Drive, Removed old library, restarted Arduino and verified no grbl library installed, added fresh .zip library from latest Drive download and tried the upload again. Still showing the same error codes:

Arduino: 1.8.19 (Mac OS X), Board: “Arduino Nano, ATmega328P”

In file included from /Users/Daddy/Documents/Arduino/libraries/grbl/config.h:30:0,
from /Users/Daddy/Documents/Arduino/grbl_flash_to_eleks_maker/grbl_flash_to_eleks_maker.ino:3:
/Users/Daddy/Documents/Arduino/libraries/grbl/grbl.h:68:4: error: #error “Required HOMING_CYCLE_0 not defined.”
#error “Required HOMING_CYCLE_0 not defined.”
^~~~~
/Users/Daddy/Documents/Arduino/libraries/grbl/grbl.h:108:4: error: #error “WCO refresh must be greater than one.”
#error “WCO refresh must be greater than one.”
^~~~~
/Users/Daddy/Documents/Arduino/libraries/grbl/grbl.h:111:4: error: #error “Override refresh must be greater than zero.”
#error “Override refresh must be greater than zero.”
^~~~~
exit status 1
Error compiling for board Arduino Nano.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

Ok, well, being at a loss I tried to use the command line to install home brew and avrdude on my Mac, Nothing happens when I type the command for homebrew install into the terminal.
Tried command: brew install avrdude
Terminal response: zsh: command not found: brew

Don’t know what this is… if it won’t install then invoking it won’t work either…

If you have the IDE running, I would think it must have installed avrdude … ?

Can you search for it on your machine?

Don’t know Mac well enough to help you here… I use ‘find’ on my Linux box.

:smile_cat:

From the YT tutorial HomeBrew is something the terminal uses on the Mac in order to install apps like avrdude. I’ll search for avrdude.