Coder Social home page Coder Social logo

I don't understand the steps about moppy2 HOT 32 CLOSED

sammy1am avatar sammy1am commented on August 20, 2024
I don't understand the steps

from moppy2.

Comments (32)

Sammy1Am avatar Sammy1Am commented on August 20, 2024

Hello there, I'm certainly happy to help out however I can, but first, let's figure out what we've got going on:

  • What have you done successfully so far?
  • What are you stuck on / isn't working?
  • What error message / behavior are you seeing?

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

from moppy2.

Sammy1Am avatar Sammy1Am commented on August 20, 2024

The error you're running into is related to the serial drivers (looks like it's trying to load the 32-bit version on a 64-bit system).

However it also appears you're attempting to use the older version of Moppy. Go ahead and grab the latest version on the releases page. You'll need to use both the newer Arduino code and the newer Java code (should launch just using the .bat file, no need for NetBeans).

The newer version has more stable serial libraries, so that should resolve some of the problems.

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

Sorry it's been so long since my last message. Since then I have gotten it to work with 8 drives. I was curious about 2 things. First, is it possible to use the same code to make an old scanner play music? Second, I've been trying to use the trial version of FL studio to edit sound files so they are in the range of the drives but when I load in the file it plays them all on the smart drive. Do you know how to fix this?

from moppy2.

Sammy1Am avatar Sammy1Am commented on August 20, 2024

Glad you got it working!

First, more or less the answer is yes. The code generates timed pulses at the desired note frequency to drive the floppy drive, so the same pulses can be used to drive any sort of stepper motor (such as the ones in scanners). However, I'm not personally familiar with how the hardware side of things works for a scanner setup (though there have been others here that have got it working, so search around a bit.

Second, what do you mean, "it plays them all on the smart drive"?

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

from moppy2.

Sammy1Am avatar Sammy1Am commented on August 20, 2024

Which drive a particular note is played on is determined by the MIDI Channel that that note is assigned to. I'm not familar with FL Studio, but you'll need to figure out how to get each track assigned to a separate channel.

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

from moppy2.

Sammy1Am avatar Sammy1Am commented on August 20, 2024

I don't see an attachment, I'm not sure that worked. Regardless, I wouldn't know which ones need to be hooked up; you'd have to look up the specs for that particular motor.

However, unless the stepper motor has some integrated circuitry, you're most likely going to need a stepper motor driver. The L298N does actually have Moppy support already thanks to the help of @Lothean , so that might be an easy one to start with if you don't already have a driver you're trying to use.

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

from moppy2.

Sammy1Am avatar Sammy1Am commented on August 20, 2024

I'm always happy to answer any questions you end up having, but I've never set up a stepper driver so you'll probably find more accurate help / guides on Google.

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

from moppy2.

tobiasfrck avatar tobiasfrck commented on August 20, 2024

I think you can use the A4988 and according to this it is controlled the same way. I would use a different Arduino for different instruments because a scanner can play higher notes but the floppys can not and in the floppy code there is no speration. Every floppy or scanner on the same Arduino would have the same max note. The 2 extra wires are not necessary. The driver would do an eights step by default but I don't know if it is the same on the A4988 (or BigEasyDriver).
So yes you can just wire the A4988 up as a floppy drive but:

  1. The floppy drives may try to play notes that they are not capable to play properly if you set the MAX_FLOPPY_NOTE = 71; to MAX_FLOPPY_NOTE = 107; in src/MoppyInstruments/FloppyDrives.cpp which is necessary for the scanner to play high notes.
  2. You may want to change the values in FloppyDrives::MAX_POSITION[] for each scanner to a higher value like: if scanner is "drive" 8 then change it to: {158,158,158,158,158,158,158,5000,158,158}.

(I hope this is correct if not please correct me)

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

from moppy2.

Sammy1Am avatar Sammy1Am commented on August 20, 2024

A handy tip for GitHub is that you can search within a repository for a particular term (like MAX_POSITION) if someone mentions something that you can't seem to find.

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

I found that in the code but I don't know what max possition means and how raising or lowering any of those values would effect any of the drives/scanner.

from moppy2.

Sammy1Am avatar Sammy1Am commented on August 20, 2024

"Maximum position" in this case means the maximum number of steps forward the drive head will take before it reverses direction (as the comments in the code explain, the values stored in the MAX_POSITION array are actually double the number of steps).

Increasing this value for the appropriate "drive" (or scanner in your case) will tell Moppy to take more steps forward before reversing the direction of the steps. Because we're using an unsigned int, on an Arduino Uno the maximum possible value is 65,535 (though 65,534 probably makes more sense because it's divisible by 2).

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

So if I have my scanner's motor driver hooked up to pins 2 and 3 and I raise the first value it should go farther before changing direction?

from moppy2.

Sammy1Am avatar Sammy1Am commented on August 20, 2024

If by "first value" you mean the value at index 1, yes. Note that as it says in the comments, the value at index 0 (the zeroth value, I guess) has a special purpose.

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

from moppy2.

Sammy1Am avatar Sammy1Am commented on August 20, 2024

There should be 10 values 😉

If you wanted to add drives 10 and 11, you would need to add two more values to that array, but also to several other arrays in that same file, as well as changing the max sub address value, and adding some code blocks in the tick() function.

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

from moppy2.

Sammy1Am avatar Sammy1Am commented on August 20, 2024

You'll also need to adjust the minimum and maximum sub address values for that device so that it's listening for events sent to higher-numbered drives. I think that's probably everything, but I might be missing something; you may have to do some troubleshooting to get it working.

from moppy2.

owenr930 avatar owenr930 commented on August 20, 2024

from moppy2.

DinukaShehan avatar DinukaShehan commented on August 20, 2024

Hello there, I'm certainly happy to help out however I can, but first, let's figure out what we've got going on:

  • What have you done successfully so far?
  • What are you stuck on / isn't working?
  • What error message / behavior are you seeing?

please make video how to install all the stuff? not understand properly

from moppy2.

Sammy1Am avatar Sammy1Am commented on August 20, 2024

@DinukaShehan If you're having issues, please:

  1. Create a new issue, rather than piggy-backing on an existing one (unless your problems are related to the issue that's already been created)
  2. In the new issue, please answer the following questions:
    2.1 What have you done successfully so far?
    2.2 What are you stuck on / isn't working?
    2.3 What error message / behavior are you seeing?

from moppy2.

Sammy1Am avatar Sammy1Am commented on August 20, 2024

Closing for lack of activity. A tutorial video is available now.

from moppy2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.