Morning Dust.
I'm sorry, I think I've done something wrong...
I downloaded Marlin 2.1.1 and edited the file Configuration_adv.h
by adding
#define SPINDLE_LASER_PWM_PIN 4
at line 3400 the laser section
I built it with Visual Studio code and platform IO - no errors, a couple of warnings about feedback. Then I upload it to the board and get this..
Executing task in folder Marlin-2.1.1: platformio run --target upload
Processing mega2560 (board: megaatmega2560; platform: [email protected]~3.4; framework: arduino)
---------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: [docs.platformio.org]
PLATFORM: Atmel AVR (3.4.0) > Arduino Mega or Mega 2560 ATmega2560 (Mega 2560)
HARDWARE: ATMEGA2560 16MHz, 8KB RAM, 248KB Flash
DEBUG: Current (avr-stub) On-board (avr-stub, simavr)
PACKAGES:
- framework-arduino-avr @ 5.1.0
- tool-avrdude @ 1.60300.200527 (6.3.0)
- toolchain-atmelavr @ 1.70300.191015 (7.3.0)
Converting Marlin.ino
LDF: Library Dependency Finder -> [bit.ly]
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 5 compatible libraries
Scanning dependencies...
Dependency Graph
|-- SPI @ 1.0
|-- Wire @ 1.0
Building in release mode
Compiling .pio/build/mega2560/src/src/inc/Warnings.cpp.o
Marlin/src/inc/Warnings.cpp:63:4: warning: #warning "Your Configuration provides no method to acquire user feedback!" [-Wcpp]
#warning "Your Configuration provides no method to acquire user feedback!"
^~~~~~~
Linking .pio/build/mega2560/firmware.elf
Checking size .pio/build/mega2560/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [=== ] 30.4% (used 2489 bytes from 8192 bytes)
Flash: [== ] 21.8% (used 55300 bytes from 253952 bytes)
Configuring upload protocol...
AVAILABLE: wiring
CURRENT: upload_protocol = wiring
Looking for upload port...
Warning! Please install `99-platformio-udev.rules`.
More details: [docs.platformio.org]
Auto-detected: /dev/ttyUSB0
Uploading .pio/build/mega2560/firmware.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: reading input file ".pio/build/mega2560/firmware.hex"
avrdude: writing flash (55300 bytes):
Writing | ################################################## | 100% 8.50s
avrdude: 55300 bytes of flash written
avrdude: verifying flash memory against .pio/build/mega2560/firmware.hex:
avrdude: load data flash data from input file .pio/build/mega2560/firmware.hex:
avrdude: input file .pio/build/mega2560/firmware.hex contains 55300 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 6.65s
avrdude: verifying ...
avrdude: 55300 bytes of flash verified
avrdude: safemode: Fuses OK (E:FD, H
8, L:FF)
avrdude done. Thank you.
=============================== [SUCCESS] Took 29.15 seconds ===============================
Environment Status Duration
------------- -------- ------------
mega2560 SUCCESS 00:00:29.148
I reboot the board and the screen is on but no data displayed - I guess this due to the display not being configured on this vanilla firmware - no problem.
I have Octopi connected to the board so I send a
m106 s5 command via the terminal and I get a pretty blue light glowing within the temporary shroud I have created.
Which is awesome! Thank you.
However I was under the impression that the "s5" was a speed\power setting between 1 and 255.
So I retried with a power of s100 i.e. m106 s100
The glow disappears but the fan attached to the laser increased speed.
It is the same for all "s" values with the exception of s3, s4 and s5 where the intensity of the glow and fan speed increase as the number increases.
Any ideas regarding what I have done wrong?
Thank you for your patience and assistance.
W