Jump to content
  • 0

Lwclone On Arduino Mega 2560


cyclemat

Question

Here comes the LWClone on Arduino MEGA 2560

 

How to Compile

Windows Prerequisites

On Windows, you will need a copy of the latest Atmel Toolchain, either downloaded 
and installed as a standalone package, or installed as part of Atmel Studio. 
You will need to ensure that the "bin" directory of the toolchain is available 
in your system's PATH environment variable.

In addition, you will need to install a ported version of the ZSH or BASH *nix shells, 
and a standard set of *nix utilities such as cut, find and sed. 
These can be found in the "basic" system package of the of the MinGW installer (http://www.mingw.org). 
Once installed, add the "msys\1.0\bin" of the MinGW installation folder is added 
to your system's PATH environment variable.

The bootloaders currently also require the "bc" application, 
which can be installed from http://gnuwin32.sourceforge.net/downlinks/bc.php. 
Once installed add the "GnuWin32\bin" path of the GnuWin32 installation folder 
to your system's PATH environment variable.

Linux Prerequisites

On Linux systems you will need to install the latest Linux distribution 
of the standalone Atmel Toolchain from the Atmel website for general development, 
or use the latest avr-libc and avr-gcc packages for your chosen distribution's package 
manager. For full device support, the Atmel standalone package is recommended.

How 2 Flash

Connect your Arduino to USB and look witch comport it has
Start Flash Main Chip Arduino Mega to LW.bat
enter your Comport e.g com2 or com32 what ever
Remove USB
Connect your USBASP to the ISP header behind the USB port
Start Flash 8u2 - 16u2 Arduino Mega - with USBASP Dongle to LW.bat
Connect The USB port wait for reorgination the Device 
Start Change ArduLW ID.bat
Enter your LEDWIZ ID e.g. 1 or 2 up to 16
That is it test it with Visualpinball an Pinmame/DOF

 have make New packages 23.01.2016

 

https://mega.nz/#F!bdZHVaxK!3WmePgTED-3xQp8oj-ZfOA

 

one package with inverted LED ports so that High ist normal and low is on ( for the Relaisboards from ebay)

 

 

For Boards that say it gives problems with The STK500 Timeout Error Here ist a Short way to fix it !?!?

 

 

1. Connect the USBASP to the ISP connector behind the USB Port.

2.Start the  "0. Flash 8u2 - 16u2 Arduino Mega - with USBASP Dongle to Arduino.bat"

 

3. Connect the USBASP to the Second ISP port

4. Start the "Flash m2560 Unlock fuses, erase, verify - with USBASP Dongle.bat"

5. Start the "Flash m2560 Write the bootloader, set the lock fuse, verify  - with USBASP Dongle.bat"

 

 

Now you can flash it normaly

 

when the flash with the USB ASP didnt work test to bridge the GND point on the 10->6 Pole Converter

 

FOR HELP PLEASE POST YOUR PINMAP.H AS CODE AND WHEN YOU HAVE COMPILING PROBLEMS POST YOUR OUTPUT AS CODE SO I CAN BETTER

HELP

 

So have make a little Video tutorial don`t say anything about my english have do my best.

 

 

 

 

 

Link to comment
Share on other sites

Recommended Posts

  • 0

Hello flicki,

 

I'm so happy to see another member who keep interest with this project !!!

first of all, I'm glad you make your flashing process work, that's the first way to the next level ;) 

I began to make my own change with the mapping process and I tried to compile the code different way to make joypad buttons  work... but that don't.  For your information, i couldn't compile in windows, so I installed linux on another HDD and I compile under Ubuntu, much easier.

For me the code isn't finished and we need a super-coder to make it works correctly (@kakou).

I've got another problem with many arduinos clone... lag/freeze with buttons (flips don't move or keep in high level, you have to push another time). 

 

Please continue to share your experience. ;) thx

 

 

 

 

Link to comment
Share on other sites

  • 0

@alonia 

Which Arduino Mega did you buy ? 

Do you use an USBASP as described in cyclemat tutorial ? 

which type of USBASP ?

Are you sure your MEGA have a 16U2 chip ?  (and not a china clone with CH340)

 

There is so many reason to have this message, you have to give us more precision ;)

 

 

Link to comment
Share on other sites

  • 0
On 2017-10-25 at 10:12 AM, Aetios said:

@UncleSash  Good Job !

 

Here is the last Firwmare, I've remapped some buttons, changed the hotkey attribution and switched buttons.

I've made a double pack for two type of Arduinos MEGA2560 :

- those which have a DFU mode 

- and without DFU, so the same way that cyclemat explain here (with USBASP etc...)

 

Last Firmware Pack : https://mega.nz/#!t8c3wChI!HYkTybykeWW-CSzzqDcPaVBNcBk8ujmkHTz8YxxihqQ

For the DFU mode method, you need also FLIP 3.4.7 to flash the 16U2 chipset  https://mega.nz/#!o0NCSARJ!HEXEutTiIVyjaiv-57tuFtO3e1_MweD84-XJ6YPpmyg

 

I will write another How To if necessary, I wrote one but it's in french in Pincab Passion.

 

For those who wants to try, I recommand to buy a Funduino MEGA2560, it has the DFU mode (no need for an USBASP) and works perfectly  with this new firmware

 

 

Hi. I have tried to get my genuine Arduino mega 2560 R3 to work for a many days now.

I have tried on Windows 10 and Windows 7.

My Arduino have DFU mode so this is what I have done.

* 1. Run this file -----> Flash Main Chip Arduino Mega to LW.bat

* 2. Then I put Arduino in DFU mode and flash with the file ----->  arduino_mega2560__m16u2.hex with Flip software.

* 3. Unplugged the Arduino and plug back in to computers usb port, the computer installs the Ultimatepincab board.

I can change the ledwiz id of the board, I can open ledblinky without error, ledblinky recognize the ledwiz id.

But I can not get any led to light or blink, it is completly black

Joystick or keyboard buttons do not work at all.

Have I done something wrong? Please help med someone.

Link to comment
Share on other sites

  • 0

Hi to all i have tried everything with no result at all.

My arduino mega china clone have (really stange) DFU so first time i am able to flash it with FLIP and all seems ok and it is recongnized from SimpleLEDTest.exe (id 4????) but signal from port are wrong and it is impossible to use. 

I have tried to reflash with flip with the result that it is no more recognized by SimpleLEDTest (No led controller detected)

I have USBASP and 10 to 6 pin adapter so i started back from zero and i have no error at all and i ended all part with perfect result i have reattached mega with usb and i have 3 device (ultimate ....) with libusb driver but  SimpleLEDTest  or Change ArduLW ID give me no device (No led controller detected)

I have used zadig to change usb driver to winusb and i have 3 device called UltimaPincontroll  but  SimpleLEDTest  or Change ArduLW ID give me no device (No led controller detected)

I am using win 10 and for me it is difficoulkt to find a win7 pc to try over it is possibile to use a virtual machine?

I have tried more then 10 times. 

Please help me to figure out the problem

 

Ledwiz device.png

Ledwiz error.png

Ledwiz device_1.png

Ledwiz error_1.png

Link to comment
Share on other sites

  • 0

Finally i manage to complete the procedere with succes i do not know what is the problem but now i have a recognized ledwiz clone.

I have fixed dll access violation error with new dll and I have an original working  ledwiz so i know how it should work but now i have 5v when led is off and it only shot down led when i put britness to 0.

Essentially on off button in test led NewLedTester.exe do not work for me. I took 5V from arduino mega pin 22 and connect small RGB LED to pin 24,26,28

 

Link to comment
Share on other sites

  • 0

Hi everyone.

Before digging into the code, i wonder if someone already successfully included the MPU-6050 accelometer into the LWClone software.
I used what i had around, so i installed a LWCLone - which works like a charm for all inputs and toy related outputs.
Installed 10 solenoids, gear, speed controlled shaker and undercab rgb lighting.
The teensy 3.2 is also installed controlling the LEDs around the playfield.
Plunger and nudge are still missing, but the 6050 is alread at hand.
If nobody has a working solution i will try to implement it myself.


Cheers - Vince

 

Link to comment
Share on other sites

  • 0

What to if i wanna disable nudge and plunger on the clone ??? when i connect together with my kl25z (who control already nudge and plunger) ... table shakes and act strangely .... ledwiz part control everything nicely without any prob.

(kl25z control nudge/plunger/contactors , lwclone control everything that produce lightning so far ,,, i did'nt have any trouble except on 3the contactor who do not fire up everytime (surely a cable who is'nt correctly connected))

If someone have already a compiled version/.bat for it ... thx

Link to comment
Share on other sites

  • 0
On 10/10/2020 at 5:28 AM, jawah said:

What to if i wanna disable nudge and plunger on the clone ??? when i connect together with my kl25z (who control already nudge and plunger) ... table shakes and act strangely .... ledwiz part control everything nicely without any prob.

(kl25z control nudge/plunger/contactors , lwclone control everything that produce lightning so far ,,, i did'nt have any trouble except on 3the contactor who do not fire up everytime (surely a cable who is'nt correctly connected))

If someone have already a compiled version/.bat for it ... thx

I was going to recompile with it disabled, but it was easier just to disable the the game controller in Windows device manager (shows as an HID-compliant-game-controller under Human Interface Devices)

Link to comment
Share on other sites

  • 0
On 11/8/2019 at 8:57 AM, VincentVega said:

Hi everyone.

Before digging into the code, i wonder if someone already successfully included the MPU-6050 accelometer into the LWClone software.
I used what i had around, so i installed a LWCLone - which works like a charm for all inputs and toy related outputs.
Installed 10 solenoids, gear, speed controlled shaker and undercab rgb lighting.
The teensy 3.2 is also installed controlling the LEDs around the playfield.
Plunger and nudge are still missing, but the 6050 is alread at hand.
If nobody has a working solution i will try to implement it myself.


Cheers - Vince

 

Did you have success implementing the accelerator?

Link to comment
Share on other sites

  • 0

Yeah that was a big bummer to check all the links to no avail.  The firmware build for my Loenardo isn't that deep but I must be missing something silly.  Still learning but I'm frustrated as hell at this point.  So hint, hint y'all.  Hook us up pretty please.

Link to comment
Share on other sites

  • 0

Hello.

 

I think lwclone it`s very important this days (frdm-kl25z  it`s very expensive today)

 

I have packed everything i have from cyclemat lwclone and also my experience flashing arduino MEGA :

 

emptyinside   shiryu55   Darin

 

here are the files you need

https://drive.google.com/file/d/15swIkwZwvUUlrQItzPpd3O0kD1qC0GxH/view?usp=sharing

 

 

Now you have the files, if you need some help i will try to help 

Edited by javiersertaun
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...