1

This is the outline of my project:

  1. interpret environment data (sensor, motor, etc..).
  2. Modify this data into a more usable form,
  3. send it back to the same motor for further operation from modified data.

As an example (this is not the project, but just an example to make sure I am being clear).

A motor moves a conveyor belt with various size flasks on it, some large other small. Depending on the reading of the position of the motor (from encoder) another process (filling the flasks) will take place. If the first motor encoder data indicated the flask was small then the amount of liquid poured will be small. If large, the amount of liquid dispensed will be large.

More generally, read the location of an item based on motor encoder feedback. Modify this data. Send this modified data back to a different motor so that it does something specifically as a function of the first motor encoder data.

I am able to send the original encoder feedback to a file, manually massage it and paste it into an Arduino script, compile and have everything work great. I just want to remove the manual steps (cut & paste) and data massaging (I'm looking to an Arduino program to do that).

To further complicate things, I want this process to be part of a distributable package that does not require further compiling. Reading from a sim card is fine. Also, I am not too price sensitive as the Arduino is a small portion of the total cost of the final product.

I hope someone can give me some insight or pathway to a solution. All the very best, John.

  • If I understand your question properly, you want to take some data which you have in memory on the Arduino, change it somehow, and put it somewhere else in memory. Is that right? I think you'll need to give us a clue as to what data you have and how you want to manipulate it. – Mark Smith Apr 1 '16 at 20:33
  • i am taking encoder readings, performing text concatenations, sorting and then applying transformed data to a stepper motor controller. I investigated using a raspberry PI and arduino combination (raspberry for concatenating and sorting and arduino for sensor feedback and motor control) but am stuck on how to have the 2 talk without the end user having to be involved (needs to end up being a distributed product) – John Apr 1 '16 at 21:11
  • 2
    A solution to what exactly? I would suggest that you write a sketch in C/C++ using the Arduino core and get back to us when you have an actual question. Do not forget to include the wiring/circuit/schematics and some code and a real question. – Mikael Patel Apr 1 '16 at 21:18
  • 2
    Yeah, I agree with @MikaelPatel - you haven't stated any clear problem to solve. You didn't even mention as Raspberry Pi in the question...! Reading sensors, doing some processing on the data and controlling motors is bread-and-butter for the Arduino so I think you'll need to be more specific if you want an answer better than "yeah, maybe use an Arduino". – Mark Smith Apr 1 '16 at 21:20
  • Sorry, I did mention I looked into R-Pi, not that I "wanted" to have it part of the solution. To be honest, I am a total newbie to this and am looking for an idea of what to look into as I am not even sure if what I want to do can be done with Arduino. I was hoping for a "use the XYZ" to talk to the "ABC" by running "123" kind of a "point in the right direction". I do know python (a bit), just not that swift at electronics and C/C++ – John Apr 1 '16 at 21:28
1

Here's a back-of-envelope sketch, off the top of my head:

Conveyor belt driven by stepper motor, controlled by the Arduino. Each step is a known distance.

Bottles are either of exactly two heights, at random. Two beam break sensors, one to determine where a bottle starts and one to determine whether it's tall or short.

Some sort of valve to control the water flow - I presume you have some idea how this can be controlled. I don't, but washing machines have electrically-controlled valves so something broadly along those lines. Controllable on/off by the Arduino.

Software on the Arduino steps the motor until it sees the start of a bottle (first beam broken). Then uses second beam to determine whether the bottle is large or small.

Arduino switches on the water valve (outlet positioned exactly right to be above the bottle) for either 2s or 4s accoriding to bottle size, then off again. (Water pressure and flow rate regulated independently, perhaps fed from a header tank).

Arduino steps motor more until it sees another bottle.


No string concatenation in there, nor sorting of lists or need for a Raspberry Pi. It's not clear to me why you'd need those things for the application described.

I'm not aware that you can program the Arduino in Python unfortunately. Someone may know better. C isn't hard though - get an Arduino and some LEDs or whatever, go through some tutorials, you'll get the hang of it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.