Arduino IO Expansion

More
1 year 7 months ago #324213 by d12k6
Replied by d12k6 on topic Arduino IO Expansion
e.g. touch tft or "waiting" for a analog value.

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #324232 by AlexMagToast
Replied by AlexMagToast on topic Arduino IO Expansion
you mean if a analog value is above X = High, if below = LOW?

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #324264 by d12k6
Replied by d12k6 on topic Arduino IO Expansion
exactly.

e.g. analog threshold:

if( value >= anaValue ) X = true
else X = false

or touch button:

if( isButtonPressed(btn, touchX, touchY )
X = true
else
X = false

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago - 1 year 7 months ago #324533 by d12k6
Replied by d12k6 on topic Arduino IO Expansion
I solved it (nicht das gelbe vom Ei but it works image missing /media/kunena/emoticons/cool.png)

I call the sendData function
if (isButtonPressed(btnX, touchX, touchY))    
{
     
btnX.state = !btnX.state;     
drawButton(btnX);     
sendData('I',8,btnX.state);        
}


So I don't use physical buttons. Later I will share my TFT touch handweel (with your ArduinoConnector) on Github. I will modify your Code with virtual IO's and w/r strings (e.g. scale value - 0.01; 0.1; 1.0). Or, is there another why to send the scaling values to my linuxcnc?

Actully I manipulated the analog command in your python code (c["ain.{}".format(io)] = value/100 #remove /100 - now I send 1; 10; 100 for scaling) for the scaling function and will try it later with the r/w strings.
Last edit: 1 year 7 months ago by d12k6.
The following user(s) said Thank You: AlexMagToast

Please Log in or Create an account to join the conversation.

More
1 year 3 months ago - 1 year 3 months ago #331435 by vre
Replied by vre on topic Arduino IO Expansion
Can I use this project for 4 analog pot inputs rapid feed spindle and jog speed?
Arguino pro mini will work ? 
How I will connect with PC with ttl2USB adapter or it is better to use leonardo that has USB interface?
What about esp32 will work with this?
Last edit: 1 year 3 months ago by vre.

Please Log in or Create an account to join the conversation.

More
1 year 2 months ago #332723 by AlexMagToast
Replied by AlexMagToast on topic Arduino IO Expansion
Hi, yes that is possible. I would actually reccommend the esp32 over the Arduino, as if I remember correctly the ADC resolution is better on the ESP.
I only ever used it with USB interface.
If you know what you are doing I guess you can run it in ttl2USB too.

Please Log in or Create an account to join the conversation.

Time to create page: 0.199 seconds
Powered by Kunena Forum