Hello Guest it is March 28, 2024, 05:43:52 PM

Author Topic: Mach4 - Arduino and Touchscreen  (Read 31171 times)

0 Members and 1 Guest are viewing this topic.

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Mach4 - Arduino and Touchscreen
« Reply #20 on: May 30, 2015, 05:40:20 AM »
To add my two cents worth to the topic of board choices, I don't think there is an answer to the 'which board is best' question. Like the age old Chevy vs Ford debate, it is opene ended and always will be.

In my view the best board choice is application dependent. If you need an OS, and you have not the skill or time to be porting stuff, then it is wise to [purchase a board that already has an available OS that will run your software.

Really, processor wars are all fine and good, and dual or quad core processors are spectacular IF you have an OS that supports them or an appropriate compiler, otherwise they are essentially single core processor. The overall success of a given board in a given application boils down to what support chips you need for your application and which are integrated into the board. For example, there are no single chip solutions for Modbus (that I know of) and the calculations are integer math so that playing field is fairly level, however, there are a number of single chip USB, Ethernet, Bluetooth, and so on. Some Atmel processors (Arduino) have I2C built in as well as very fast high resolution (in the case od DUE0 A/D converters and interrupt controllers that are supported by available libraries.

My application requires a lot of FP math, so that is weighted heavily when choosing a processor, but I also need Ethernet and non-volatile storage, so integrated Ethernet and either EEPROM or an SD card reader is a distinct advantage. I do not need blue tooth, so that has zero weight. The next application might need blue tooth and no Ethernet, so the choice might be different.

Unless you want to spend the liion's share of your development time 're-inventing the wheel', available (and working) libraries for the functions that you need should be at the top of the list. Modbus is a good example of that.


Re: Mach4 - Arduino and Touchscreen
« Reply #21 on: June 06, 2015, 12:51:41 AM »
what's up in the audrino/raspberry pi/beagleboard world with m4? I'll get there eventually....after I figure out Lua, then only to figure out Python or whatever these microcontrollers use, lol! it's all good... if I'm not learning something new, I'm wasting my time :o)

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Mach4 - Arduino and Touchscreen
« Reply #22 on: June 06, 2015, 01:00:52 AM »
what's up in the audrino/raspberry pi/beagleboard world with m4? I'll get there eventually....after I figure out Lua, then only to figure out Python or whatever these microcontrollers use, lol! it's all good... if I'm not learning something new, I'm wasting my time :o)


as a old block told me years ago if you stop learning your dead.

I would hang on a bit to the new boards that addafruit are making for Arduino and sparkfun are making there new boards that are meant to use arduino library and are a lot faster

Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re: Mach4 - Arduino and Touchscreen
« Reply #23 on: June 06, 2015, 01:41:11 AM »
Keep your eyes open for an Arduino TRE when they come out, these are a joint board being developed by arduino and beaglebone.

DazTheGas
New For 2022 - Instagram: dazthegas
Re: Mach4 - Arduino and Touchscreen
« Reply #24 on: June 06, 2015, 01:46:26 AM »
yah! I've been watching....dude, this can be soooo awesome!

I love that comment Dan! ...stop learning and your dead. (period. no emotion. it's just fact.)

MIT has nothing on us! Little terds....okay, smart little terds but terds nuntheless. haha! I'm just havin fun!
Re: Mach4 - Arduino and Touchscreen
« Reply #25 on: June 06, 2015, 01:52:33 AM »
Now, if we can just get Simpson36 back in here....we'all should do a collaborative project with Mach4. Whatcha y'all think? We poll for the requirement, select the right hardware (ensuring the technology and resources can meet the requirement and the design will be stable), and we just start a thread....c'mon it'd be fun! funk the money, where's the love? hehe

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Mach4 - Arduino and Touchscreen
« Reply #26 on: June 06, 2015, 03:02:57 AM »
yes that would be a good idea bit as Simpson said no need to reinvent the wheel as in arduino modbus that just need`s updated to the new version of arduino unless someone has already done it

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Mach4 - Arduino and Touchscreen
« Reply #27 on: June 06, 2015, 08:52:21 AM »
Now, if we can just get Simpson36 back in here....we'all should do a collaborative project with Mach4.  

You guys have passion and are excited about creating products for MACH4. New blood and new ideas being posted is exactly what this forum needs. I do not have time to do development threads at this time, but here I will post a bit about my projects in hopes that it will inspire and encourage any of the new members to strike out either on their own or in collaboration.  

Any of you can send me a PM with info on a new thread and I will participate as my schedule allows . .  which is not very much. Please do not send me questions via e-mail. Post here and I will answer if I can.

Here is some info on my current projects. I will provide more information on the Arduino question and Modbus question in a separate follow-on post.



I have two projects that involve the Arduino; Porting my 4th axis motor controller to MACH4 is completed. This is the controller: www.theInTurn.com The ported version looks the same . . just TCP instead of USB . .  and there are several added features.
Edit: Oops! I forgot to mention a new processor. Moving from the Arduino Mega to the Arduino DUE

The second project is adding 'super pendant' capabilities to the controller. That project is nearly complete. I am currently assembling the first prototype by neatly ( as much as is possible) combining this rat's nest:



and the rest of the components into this new panel [1st proto . . will probably change], which fits the existing controller box (for upgradability):




So there you go. Now get your own threads going with your projects!
« Last Edit: June 06, 2015, 08:55:17 AM by simpson36 »

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Mach4 - Arduino and Touchscreen
« Reply #28 on: June 06, 2015, 09:26:51 AM »
Arduino IDE and Modbus info;

It may 'appear' as though all of the Arduino boards will run the same code, but that is largely due to a trick used by the Arduino IDE. It is a good trick and serves a good purpose for the intended audience, but it causes a lot of confusion when using third party libraries (like Modbus).

The IDE contains a file which has the required parameters for each Arduino board. You tell the IDE which board you are using. The IDE looks up the parameters for your board for use in compiling your 'sketches' [Arduino speak for 'programs').

This process is transparent to the user, so there is a common misconception that all Arduinos can run the same code, but that is far from correct. Code that compiles for earlier boards will not necessarily compile for the newer boards if Arduino has not yet updated the libraries or provided new ones. When you download and install the latest IDE, you also get the updated libraries, but there is a catch . . . .  only the Arduino supplied libraries are updated.

This may have changed, but last I knew, there is no Arduino supplied Modbus library. There are quite a few public (licensed, but free) libraries  floating around, but most are quite old and will not work with the newer board. Some have been updated here and there and I *think* there may be bone that has been updated as far as the Arduino MEGA. I started with these little development boards right before the latest MEGA came out and when it hit the shelves, there were NO Modbus libraries that worked with it . . and I did a LOT of searching.

Ultimately, I took one of the libraries that 'sort of ' worked and re-wrote the parts that needed to be changed for the MEGA's processor and to include and call the MEGA's libraries.

Next up came the DUE board which is a massive improvement over the MEGA, however, extensive searching did not turn up a working Modbus SLAVE for the DUE.
It was Modbus purgatory all over again, this time requiring a much more extensive rewrite of the code I was using on the MEGA.

Another unexpected challenge is that the DUE has no EEPROM . . . as in NONE, and the new board was 3.3v only. Fortunately, the Arduino Ethernet 'shield' (Arduino speak for 'daughter card') not only was compatible with the 3.3v DUE, but had an SD card reader to store stuff . . . except that the SD library did not work on the DUE . .  catch 22. Eventually, that got worked out and the new DUE is buzzing along nicely.

The bottom line is that if you have to use a non-Arduino library, do not expect it to work transparently on any Arduino board. 'Private' libraries are likely to be board specific and even support library specific. The better news is that sometimes all you need to do is change the names of the include files to match the ones for your board.

Users will need to research the particular board they plan to use. That's why I stated in a previous post the choice of board, if you are not able to re-program or create your own libraries, should be determined, in large part, but whether a working library is available for it that you will need for your application.  

Keep all of this in mind before rushing out to get the latest and greatest ne board. I believe the newest board is based on the DUE. Similar to the relationship between the Leanardo and Yun

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Mach4 - Arduino and Touchscreen
« Reply #29 on: June 06, 2015, 07:00:38 PM »
I re wrote modbus from version 1 of arduino to 1.2 found a change log but past that I could not find any change log that was detailed enough to go to any other version of arduino a lot of the way call are done have changed so it could be one word that stuff it all up it`s quite simple to do but takes a long time I am lade up at the moment so I might play this week to see if I can port it over to the new version on a uno