Hello Guest it is March 28, 2024, 06:47:49 AM

Author Topic: Simple tutorial on analog inputs with Arduino  (Read 53986 times)

0 Members and 1 Guest are viewing this topic.

Re: Simple tutorial on analog inputs with Arduino
« Reply #10 on: April 13, 2015, 11:21:29 PM »
That's really great. I am out of country these days, so couldn't reply to your posts in time. Looks like you have figured it out yourself.

Or did you want these 8 switches on a single pot. This is possible too. Just use the map() and switch case functions in Arduino. See the command reference and examples on Arduino website.

Zafar
Re: Simple tutorial on analog inputs with Arduino
« Reply #11 on: November 30, 2015, 12:05:37 PM »
Thank you for this really great piece of arduino code! Reading arduino pins, and sending data to mach3 is awsome feature. Can you please point me on how to send data from mach3 to arduino?
I would like to send for example X position DRO value to arduino, and then print out data on display. Can I just define variable as double, and ecquire its value like this in loop:

my_variable=regs[10];

And then in mach3 brains select data input as X DRO, and then terminate as modbus address 10, and select it as Output?
Or does this code work only one way, from arduino to mach3, and some major code correction has to be done to work other way?

Thank you,
Simon
Re: Simple tutorial on analog inputs with Arduino
« Reply #13 on: November 30, 2016, 06:49:07 PM »
Zafar Bhai..u still out there?

Yes right here in Malaysia. Will be back this Sunday.
Re: Simple tutorial on analog inputs with Arduino
« Reply #14 on: January 14, 2017, 06:11:52 PM »
hi! I need help from you zafarsalam

How to setup dro info on lcd connected to arduino modbus slave on arduino with shillings code modbus slave???

Ihave included wire.h and liquidcristali2c.h for lcd in arduino code.
From now I ned help for how to send data from mach3 -->>>brain-->>serial modbus plugin--->>>arduino modbus slave ?????
many users have this done but no documentation on arduino code, no info about serial plugin configs,

Help  and thanks
Re: Simple tutorial on analog inputs with Arduino
« Reply #15 on: January 14, 2017, 09:07:43 PM »
hi! I need help from you zafarsalam

How to setup dro info on lcd connected to arduino modbus slave on arduino with shillings code modbus slave???

Ihave included wire.h and liquidcristali2c.h for lcd in arduino code.
From now I ned help for how to send data from mach3 -->>>brain-->>serial modbus plugin--->>>arduino modbus slave ?????
many users have this done but no documentation on arduino code, no info about serial plugin configs,

Help  and thanks

I am out of country right now. Will give you some tips on it when back home by this weekend.

Zafar
Re: Simple tutorial on analog inputs with Arduino
« Reply #16 on: January 19, 2017, 04:24:18 PM »
Are you home Zafarsallam?
Re: Simple tutorial on analog inputs with Arduino
« Reply #17 on: January 27, 2017, 04:03:55 AM »
Yes. I am here. I haven't tried shillings code on modbus. I am using Vinny's code. You can download it from the link on this thread. I have used it to display Mach DROs on LCD screen with arduino. I'll fish out the code, tidy it up and share it here in a few days.

Zafar
Re: Simple tutorial on analog inputs with Arduino
« Reply #18 on: January 27, 2017, 04:45:59 AM »
Ok.thanks! I am waiting.
Can not find villy's code.
Re: Simple tutorial on analog inputs with Arduino
« Reply #19 on: February 03, 2017, 10:24:20 PM »
Ok.thanks! I am waiting.
Can not find villy's code.

Download the pdf file in the first post on this thread. The links are in there.