The AlaMode from WyoLum is a pretty cool board that runs Arduino and stacks on top of the Raspberry Pi, connecting through its GPIO header for communication without external wiring. Here is a writeup of how to get Grbl Controller running on the AlaMode. I did have to make a modification to Grbl Controller to support it – not because of a problem with AlaMode, but rather due to assumptions I made on how the serial port would behave on any board running Grbl – see notes at the end of this page for details.
OK, here we go…
If you have completed the steps to setup Grbl Controller on the Pi, then you need to do additional steps to get the AlaMode working with Grbl Controller:
- First, configure the Pi to work with AlaMode. See this page for steps to perform.
- Next, fire up the Arduino IDE (“start” menu in lower left, then Programming)
- In the IDE, go to Tools > Board > AlaMode. Also Tools > Serial Port > /dev/ttyS0
- Load up a sketch: File > Examples > 01. Basics > Blink
- Then, Sketch > Verify/Compile (takes awhile since we are running Java on the Pi)
- Push the Upload button. In a few seconds you should see a green LED toggle once a second on the AlaMode
OK. Now you know AlaMode is working correctly. Next you need to get Grbl installed on AlaMode (note, the home symbol ~ can be replaced with /home/pi on the Pi, as I have seen problems with some keyboards not being configured correctly to display it):
- Close the Arduino IDE
- Hopefully you are now reading this page on the Pi (I prefer the Midori browser over Dillo)
- Open a terminal window to your home folder
- mkdir grbl
- Go to the Grbl home page and scroll down to the links to the various Grbl binaries and download the “Master Branch” file, which is v0.8c as of this writing is called grbl_v0_8c_atmega328p_16mhz_9600.hex and save it to the grbl folder
- cd grbl
- We need to find the arduino install, as it isn’t the same path as on the Grbl site:
- cd /
- sudo find -iname arduino
- From the results we infer that the necessary tools folder is in /usr/share/arduino/hardware/tools
- ls /usr/share/arduino/hardware/tools
- The last command should have shown avrdude and avrdude.conf
- cd ~/grbl
- Since your arduino version is likely 1.0.1 or above, we can use this command (refer to the info on the Grbl web site):
- /usr/share/arduino/hardware/tools/avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -pm328p -b115200 -calamode -P/dev/ttyS0 -D -Uflash:w:grbl_v0_8c_atmega328p_16mhz_9600.hex
- After running the command I saw avrdude both writing and reading (verifying) the file successfully.
Let’s see if Grbl is running.
- Download minicom and run it per instructions here except point it to /dev/ttyS0
- Type $
- I successfully saw Grbl output a number of command options
Now we need to make sure Grbl Controller works correctly. Due to the special configuration required of the serial port by AlaMode, you must use at least version 3.3.8 of Grbl Controller to manually enter the serial port. This is because Grbl Controller can’t see /dev/ttyS0. Additionally, version 3.3.8 supports a pre-initialized Grbl (more on that at the end).
- Close minicom (Ctrl A, then Z, then X and hit Enter)
- cd ~/github/GrblHoming
- Type in the serial port into the edit box: /dev/ttyS0
- Click Open
- You should now be able to use Grbl Controller.