Jump to content


majoris's Content

There have been 87 items by majoris (Search limited from 23-April 14)



Sort by                Order  

#330784 Arduino as pac-drive alternative?

Posted by majoris on 21 March 2020 - 07:32 AM in Cabinet Building

The Arduino forum really sucks. There are consultants who, instead of clear help, give you riddles - for a person who is confused enough, this is not much of a help. If you try to explain something and ask some stupid (in their opinion) questions, you will be slapped in the face and eaten by the community when you try to argue. A fantastic experience. I recommend to everyone.

 

As for open source. I don't know. I would rather share this software with a person or a team who would involve to further development. But I would need a proof of involvement in Fruit Machines community growth, and some programming skills. I do not want to give away this software to anyone without any control of the source code. It was a lot of work for me. I had to learn a lot of things to make it working. You know, this small piece of software has a big value for me. I don't wat it to be spoiled.

 

And maybe some day I will get back to it by myself? Who knows...




#330747 Arduino as pac-drive alternative?

Posted by majoris on 18 March 2020 - 12:44 PM in Cabinet Building

Yes mate. This is broader version. I have not published this one. It scans more spots in MFME memory process, and sends to COM port. For now the whole program is outdated, because of some memory addressing changes made by Wizard in MFME during the updates. To be honest I have no time to update the software, and to be even more honest I have lack of motivation :(.

 

The version presented on the video has more code, it can use two Arduinos to controll stuff. I had an ambition to program this thing to move stepper motors using CNC shield just like in real machine (shown on one of my videos), but I failed (but I know it can be done). Arduino forum did not help. No one helped. So whole project is suspended. If I will find someone (programmer) to cooperate with, to program the Arduino for stepper motors, then maybe whole idea would get alive again.

For now it is like it is.

Not much interrest on my idea. 7 downloads of latest version is not worth of my time no more. At the beginning I had more enthusiasm because I thought the idea had potential. It is verified now.

Stay healthy and take care of your family!




#328837 Arduino as pac-drive alternative?

Posted by majoris on 22 October 2019 - 06:15 AM in Cabinet Building

Just a quick update for MFME 19. Not fully tested, but working. Please report any issues. It took some time to publish this version. It was ready a long time ago, but had no time to finish.... time time time....

 

Dimming is working but I had to remove color changes from the Squeezer. It was crashing sometimes because of faulty memory reading on machine change. Now it is stable, but less spectacular. Anyway, It will work fine on Arduino.

Attached Files




#324951 Arduino as pac-drive alternative?

Posted by majoris on 02 April 2019 - 04:32 PM in Cabinet Building

Responsiveness of Fruit Squeezer - how should it run:

 

Some description in the video info.

At the beginnign while no MFME rom is loaded, Fruit Squeezer is scanning the memory for exact pattern (terrible lag), which is not found. Operation is repeated (still lags) untill we run the game. After game is started, program finds needed spot and stops scanning. We see zero lag. 100% responsiveness. After finding the game everything should run as on my example. If it doesn't then we have some problem. Fruit Squeezer will not work properly.

If it is running properly, everything should be automatic. Rom name finding, making config file, loading config values, connecting to COM port (only if saved to config), etc... All necessary cabinet features.




#324948 Arduino as pac-drive alternative?

Posted by majoris on 02 April 2019 - 03:59 PM in Cabinet Building

I've done a quick refresh speed test and baud rate doesn't seem to have any impact for latency of lights. I'd say that Arduino reacts slight faster than computer monitor. Below I'm publishing two slow motion videos of START button lamp. Machine is running in attract mode to get most of the light signal commands running on the serial transmission.

 

115200 baud rate:

 

256000 baud rate:




#324937 Arduino as pac-drive alternative?

Posted by majoris on 02 April 2019 - 09:11 AM in Cabinet Building

I was too late to edit my post, so I have to put it here.

 

I have looked at my last video with example payout on Dam Buster game, and I confirm latency.

Some improvements on the software should be done to improve performance. Mostly the serial data flow. Higher baud rate and turning off unnecessary outputs.

Example video (put it to slow motion):




#324936 Arduino as pac-drive alternative?

Posted by majoris on 02 April 2019 - 08:59 AM in Cabinet Building

I would have to dig out my electronic stuff and connect it back to life. Maybe I'll do that. From my experience I can tell, that I had no latency on my setup. I don't quite remember if I tested latency on Arduino Mega or UNO. I remember that I tested it on slo-mo video, and it has shown, that computer monitor was little behind the Arduino. I'll try to find this video.

Minimal latency is crucial for this project. I will check this out when I will have a moment. From your info I can see that we have a problem with latency on your setup. There is no way to loose some light flashes. I must check it.

 

As for interrupt on PIN 21. Well I was thinking on interrupts, and even tried one, but after some experiments I decided to write a code which compares coin sensor state. I got some errors on payout from my hopper using interrupt. I already forgotten some of the details of my thinking, so I can't tell you exactly why I did this. But I also used interrupt and resigned for some reason. Would be helpful to remember but I can't. Maybe I did something wrong with the code? Maybe I'll try your code to see how it runs. My code and "falling" interrupt looks to have same logic, so interrupt implementations seem to be a goog idea. Worth testing.

 

As for the baud rates, I don't see a problem. We can try higher values. 115 200 is le lowest usable rate for this solution. I've tried lower, but it fails. I don't think that higher baud rate would be any problem. First version of Squeezer had possibility to manualy set the baud rate, but I resigned. It is now hard coded to program. But we can change that.




#324931 Arduino as pac-drive alternative?

Posted by majoris on 01 April 2019 - 09:05 PM in Cabinet Building

I will think about adding ON/OFF channel. I have it implemented on my big test program for reel movement - checkboxes, so I can decide when to send or turn off channel.

It is going to take some time, because I can do anything only on weekends, but we will see. It can be done.

 

Do you experience any noticeable latency on your lights?

What kind of hopper you are using? Just curious.

As for hopper, I have only one confirmed isse - it skips first coin after software first run. After first payout with missed coin it runs perfectly.




#324903 Arduino as pac-drive alternative?

Posted by majoris on 31 March 2019 - 04:04 PM in Cabinet Building

Have you downloaded last version of MFME from given link? You should update emulator. Try to do that.

http://www.desertisl.../file/116-mfme/

 

Version of emulator I've sent you is for previous version of Squeezer. Updated squeezer will not work.

Use all informations from my update post. Download latest MFME, download Squeezer, run it. Should work.




#324901 Arduino as pac-drive alternative?

Posted by majoris on 31 March 2019 - 01:57 PM in Cabinet Building

Update to Fruit Squeezer.

Working version. Please use latest MFME 6.1.0.363.

http://www.desertisl.../file/116-mfme/

 

Everything is stored in one archive.

You will find:

- Fruit Squeezer main program

- Arduino code

- system dll's (thanx Eric)

- info graphics (Arduino Mega pinouts, LED and hopper connections)

 

Enjoy.

 

ps. 1

In case of any problems please inform me. I'll try to help.

ps. 2

Blog will be available soon. Work in progress.

Attached Files




#324889 Arduino as pac-drive alternative?

Posted by majoris on 29 March 2019 - 06:09 AM in Cabinet Building

The problem is solved.

Fruit Squeezer is working (confirmed). With a help of User compuw22d we have done small investigation. I've located a problem. Now hopper payment issue should be no problem any more. I was able to reproduce error spotted by abispac user, as well as compuw22d. It was the same issue.

In next post I will publish Fruit Squeezer with correction.




#324885 Arduino as pac-drive alternative?

Posted by majoris on 28 March 2019 - 03:35 PM in Cabinet Building

Screenshot I've published is a big SQUEEZEEER, you coud say Fruit Crusher! It runs LEDs, payouts, reel movement on stepper motors and digital display. Everything is at developement stage, so it is disabled for use.

Getting back to topic. I'm totaly cofused with your description of problem. At the the beginning I had some idea for solution, but after further reading I've lost hope for quick help. I've never had similar problem and I have no idea how to reproduce such situation at my setup.

But I'm guessing that might be a problem with memory scan. I have some idea.

Anyway, it will be safer for you if you stick to Pac Drive. It is well tested solution and directly implemented in MFME. My Arduino solution is just alternative, and very imperfect as it seems.

I will write you a PM.

If you're interrested on doing some investigation we could try to hadle it together.




#324879 Arduino as pac-drive alternative?

Posted by majoris on 28 March 2019 - 07:40 AM in Cabinet Building

Section IN and OUT of MFME and Fruit Squeezer should match when you run a game. Fruit Squeezer reads memory adresses where those values are stored.

MFME_payout.jpg

 

fruit_squuezer_payout.jpg

 

 

Marked sections should match. If Fruit Squeezer does not show proper values according to running MFME game, then we have a problem with memory reading. Check this out and let me know. Does my program show updated values after changing a game, or putting a coin IN.




#323553 Arduino as pac-drive alternative?

Posted by majoris on 24 January 2019 - 06:10 AM in Cabinet Building

Excuse my trivial question, but have you used this code for MFME?

#define hopSens 54 //pin wejściowy z sensowa optycznego (dekrementacja licznika hoppera)
#define hopMot 55 //pin wyzwalający zasilania silnika hoppera

void setup() {
  Serial.begin(115200);
  Serial.setTimeout(10);
  pinMode(1, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);
  pinMode(14, OUTPUT);
  pinMode(15, OUTPUT);
  pinMode(16, OUTPUT);
  pinMode(17, OUTPUT);
  pinMode(18, OUTPUT);
  pinMode(19, OUTPUT);
  pinMode(20, OUTPUT);
  pinMode(21, OUTPUT);
  pinMode(22, OUTPUT);
  pinMode(23, OUTPUT);
  pinMode(24, OUTPUT);
  pinMode(25, OUTPUT);
  pinMode(26, OUTPUT);
  pinMode(27, OUTPUT);
  pinMode(28, OUTPUT);
  pinMode(29, OUTPUT);
  pinMode(30, OUTPUT);
  pinMode(31, OUTPUT);
  pinMode(32, OUTPUT);
  pinMode(33, OUTPUT);
  pinMode(34, OUTPUT);
  pinMode(35, OUTPUT);
  pinMode(36, OUTPUT);
  pinMode(37, OUTPUT);
  pinMode(38, OUTPUT);
  pinMode(39, OUTPUT);
  pinMode(40, OUTPUT);
  pinMode(41, OUTPUT);
  pinMode(42, OUTPUT);
  pinMode(43, OUTPUT);
  pinMode(44, OUTPUT);
  pinMode(45, OUTPUT);
  pinMode(46, OUTPUT);
  pinMode(47, OUTPUT);
  pinMode(48, OUTPUT);
  pinMode(49, OUTPUT);
  pinMode(50, OUTPUT);
  pinMode(51, OUTPUT);
  pinMode(52, OUTPUT);
  pinMode(53, OUTPUT);
  pinMode(54, INPUT);
  digitalWrite(54, HIGH);
  pinMode(55, OUTPUT);
  pinMode(56, OUTPUT);
  pinMode(57, OUTPUT);
  pinMode(58, OUTPUT);
  pinMode(59, OUTPUT);
  pinMode(60, OUTPUT);
  pinMode(61, OUTPUT);
  pinMode(62, OUTPUT);
  pinMode(63, OUTPUT);
  pinMode(64, OUTPUT);
  pinMode(65, OUTPUT);
  pinMode(66, OUTPUT);
  pinMode(67, OUTPUT);
  pinMode(68, OUTPUT);
  pinMode(69, OUTPUT);
}

int hopStat = 0; //ilość pulsów i tym samym monet do wypłaty
int SensorStat = 0; //aktualny stan sensora - wysoki lub niski
int lastSensorStat = 0; //poprzedni stan sensora - wysoki lub niski

void loop()
{
  SensorStat = digitalRead(hopSens); //przypisanie stanu sensora do pinu podpiętego do sensora hoppera

  if (Serial.available() > 0) //ten cały blok kodu czyta sygnały z seriala x-LEDy, c-monety
  {
    int hopSig = Serial.read();
    if (hopSig == 'c')
    {
      hopStat++;
    }
    int pin = Serial.parseInt();
    int value = Serial.parseInt();

    if (Serial.read() == 'x')
    {
      digitalWrite(pin, value);
    }

	int pinA = Serial.parseInt();
    int valueA = Serial.parseInt();
    if (Serial.read() == 'f')
    {
      analogWrite(pinA, valueA);
    }
  }
  //tu część kodu odpowiedzialna za wypłatę - sterowanie silnikiem i liczenie pulsów sensora
  if (hopStat > 0) //jeśli licznik monet będzie większy od 0, zaczynamy zabawę
  {
    digitalWrite(hopMot, 0); //włączamy silnik hoppera i tym samym całe jego zasilanie
    if (SensorStat != lastSensorStat) //jeśli stan sensora jest inny od poprzedniego stanu, wchodzimy w warunek
    {
      if (SensorStat == 1) //podniesione ramię sensora daje niski stan, gdy to nastąpi wchodzimy w warunek
      {
        hopStat--; //zmniejszamy o 1 stan licznika monet
      }
      lastSensorStat = SensorStat; //zapamiętujemy aktualny stan sensora do następnego przebiegu programu
    }
  }
  else
  {
    digitalWrite(hopMot, 1);
  }
}



#323545 Arduino as pac-drive alternative?

Posted by majoris on 23 January 2019 - 07:42 AM in Cabinet Building

Yes, auto scan was meant to be runned on cabinets, when your only worry should be power ON/OFF button. But as it seems doesn't have to work for everyone.

Fruit Squeezer loses some responsiveness during the memory scan. It scans few virtual memory containers for exact singature. When it finds it, then scan is stopped, and responsiveness returns. If MFME does not run, it keeps scanning untill signature is found, and while it is done, we experience major lag.

 

I don't know what caused your lag, because program was hooked to the game. Probably this is going to be unsolved mystery for me. Anyway, I'm glad that changed version works for you - no lag. I wish you get well soon, grab next relay module, and have fun with fruit machine emulation.

 

Take care




#323498 Arduino as pac-drive alternative?

Posted by majoris on 21 January 2019 - 07:40 PM in Cabinet Building

I've prepared you changed version. Check PM. And try how it runs with yor computer. You shouldn't experience any lag again. If it will lag again then I give up...




#323488 Arduino as pac-drive alternative?

Posted by majoris on 21 January 2019 - 04:52 PM in Cabinet Building

Lag is a normal thing before MFME is runned. After you run MFME, and it is found by Squeezer lag dissapears, and it should run smoothly. I will think about putting a version which does not need automatic memory scan - lag is side effect of scan process.

 

Maybe I will put back "Squeeze" (scan & connect) button, and we will se how about running this way. Give me some time. I'm very determined to help you, and I think that it will run. One way or another. :)

 

Take care!




#323482 Arduino as pac-drive alternative?

Posted by majoris on 21 January 2019 - 02:55 PM in Cabinet Building

I've checked it on my home computer, and I don't have the issue with erasing config name.

Tomorrow I will try it at work, and some other computers I'll find. This should not happen.

 

I can see other problem on your video. Program lags a lot. Something is wrong. Try to grab Fruit Squeezer window and move it around the screen. Does it move without a problem or hangs from time to time - moving little jerky?

Program led indicators should blink without any delay to emulated game. I can see that everything is moving with a lot of latency.

I will think about it, but the problem is, I've never experienced such behavior of this software... I will think about it.




#323445 Arduino as pac-drive alternative?

Posted by majoris on 19 January 2019 - 11:22 PM in Cabinet Building

Too bad. But if you dont get any response even on plain serial monitor on Arduino IDE, then there is no problem with Squeezer or MFME, but somwhere else. Your Arduino must be able to catch char 'c' typed manualy from the keyboard and sent to the Arduino device. If you properly uploaded my Arduino code, and working on proper and opened com port, then you shoud get it working. If not, then I have no idea where to look for problem and how to help. I don't think that plain system would help.

All setup was working as shown on my previous videos, so it works not only in theory. I got it running.




#323442 Arduino as pac-drive alternative?

Posted by majoris on 19 January 2019 - 09:50 PM in Cabinet Building

No. I'm running it on Win10 as well so this is not a problem.

Try without a hopper connected. Use Arduino and relay module only. Upload Adruino code, and run Arduino Serial Monitor. Without Fruit Squeezer & MFME now.

Try typing "c" char to the monitor. This is the signal ('c' char) sent by Fruit Squeezer to Arduino to increase payout counter. See the reaction of relay module.

After first c, you should get no effect (small issue to solve). Second c should trigger the relay module. After it is triggered try to ground pin 54. Relay module should turn off.




#323440 Arduino as pac-drive alternative?

Posted by majoris on 19 January 2019 - 08:45 PM in Cabinet Building

OK. I've stested again my setup, now also with payout signal - simulated by manual grounding pin 54. Works.




#323439 Arduino as pac-drive alternative?

Posted by majoris on 19 January 2019 - 08:41 PM in Cabinet Building

I missed one of your questions. Sorry.

Well, after Arduino receives payout signal from Fruit Squeezer it triggers motor Pin. This pin stays triggered as long, as payout counter in Arduino is greater than zero. This counter is decremented by pulses received on pin 54. Those pulses come from the hopper. If no signal comes from the hopper, pin 55 will stay triggerred, causing your relay to be ON for this time.

The problem with this solution is that I've tested everything on one type of hopper - Cube Hopper. If I had a chance to test other hoppers, it would be easier to help.




#323438 Arduino as pac-drive alternative?

Posted by majoris on 19 January 2019 - 08:19 PM in Cabinet Building

I'm mostly using Dam Buster for my tests, because it is pretty easy to get some payout.

One more question. Does your relay clicks on payout on Fruit Squeezer, or just on your test code?




#323436 Arduino as pac-drive alternative?

Posted by majoris on 19 January 2019 - 07:36 PM in Cabinet Building

I've checked again my setup and it works fine. Try to use unmodified Arduino code. I've tested it without hopper connected, but my relay clicks on payout, so it seems working. Fruit Squeezer sends proper commands to Arduino as it seems. Sometimes first coin is not paid out, I don't know why. But it happens only after reset of all setup. After some play it does not happen again.

My current connection:

Relay VCC to Arduino 5V

Relay IN to Arduino A1

Relay GND to Arduino GND

Works.

I haven't checked payout signals, only motor relay.




#323423 Arduino as pac-drive alternative?

Posted by majoris on 19 January 2019 - 09:28 AM in Cabinet Building

I would have to reconnect all my setup to check everything. This may take some time. At first glance, connections seem to be correct. When I have some time I'll try to check payout signal from Fruit Squeezer to Arduino.