Jump to content
Sign in to follow this  
mikered82

Autoit and Arduino (V-USB)

Recommended Posts

Hello!

Could someone help me please with a UDF/library/example to communicate with Arduino thru USB using V-USB Driver (HID Device).

I want to implement remote control for PC (TV Tuner remote). Arduino would read and decode data from an IR Sensor then send the decoded data to the PC thru USB.

Thanks! Any help much appreciated!!

Share this post


Link to post
Share on other sites

Of course I google IT! I've read about 50 topics/pages but nothing promising! Otherwise I have NOT opened a thread!  I was hoping that someone encountered the same problem and there is a solution!

Share this post


Link to post
Share on other sites

I also found that topic/script! It runs, but it doesn't have any function that get or send data from a device! Major available function are: HidD_GetCAPS, HidD_GetFeature, HidD_SetFeature, but no HidD_GetData for example!

Share this post


Link to post
Share on other sites

Hmm. It appear that the script use the data transfer over HID feature report. I guess I will have to figure out how to implement that! That will be a challenge, but I like a challenge!

Best thing about Autoit and Arduino programming is overcoming challenges (and accomplish something)! Worst thing when you have NO idea how to proceed! So, thanks for give me an incite  and for give me your time to respond! 

Share this post


Link to post
Share on other sites
On 11/21/2018 at 10:55 AM, mikered82 said:

Worst thing when you have NO idea how to proceed!

I disagree. :P

Not knowing is the ideal place to start learning. :)

Best of luck!


Always carry a towel.

Share this post


Link to post
Share on other sites

I managed to make it work with the help of a FTDI FT232 Module on Arduino side (and default Serial library) and CommMG64.au3 on Autoit side. I also used CTS/RTS pins of the module to synchronize communication between Arduino and Autoit.

Thanks for all that took the time to point me in the right direction!

PC REMOTE CONTROL.jpg

Share this post


Link to post
Share on other sites
On 12/28/2018 at 8:52 PM, Earthshine said:

When can we expect to purchase production models? LOL good job

I'm not sure if you are serious or not but at the moment I'm doing this for HOBBY only! 

Also because is a pure hobby (personal use) , and my limited english writing skill I never post my projects anywhere!

But if someone is interested in my solution for NON commercial purpose I'm willing to share! 

Untitled2.png

Edited by mikered82
Add file.

Share this post


Link to post
Share on other sites

Your English seems fine to me. The GUI looks great!

I'm interested in being able to interface with Arduino using AutoIT- but it's OK if you don't want to share the sources! That's your right (and it would have to have the Arduino sources as well, I think!).

I've tried to use a Windows media center IR controller for a couple of things in the past but gave up  in frustration (I was not using AutoIT but some other third-party tools, all my attempts were lost when the PC died from overheating).

 


Always carry a towel.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Satvik
      Hi 
      I am trying to open a dll using DLLOpen, however everytime i try to do so the function fails and returns -1 result. 
      I have the dll in the same folder as the auto it script. 
      Local $hDLL = DllOpen("C:\Users\310255155\Downloads\COMMGvv2\commg.dll") DllCall($hDLL, "int", "MessageBox", "hwnd", 0, "str", "Some text", "str", "Some title", "int", 0) DllClose($hDLL) MsgBox(0,'result',$hDLL)  
    • By dainiusb
      So I'm trying to send a string of data to Arduino using CommMG UDF. It seems that Arduino is not receiving it. I used Device Monitoring Studio and it shows that the data is sent fine and looks exactly the same as if I sent it from Arduino Serial Monitor. Is CommMG compatible with USB?
      Global $CMPort = 9 Global $CmBoBaud = 9600 Global $sportSetError = '' Global $CmboDataBits = 8 Global $CmBoParity = "none" Global $CmBoStop = 1 Global $setflow = 2 _CommSetPort($CMPort, $sportSetError, $CmBoBaud, $CmboDataBits, $CmBoParity, $CmBoStop, $setflow) If @error Then MsgBox(16,"Error!","Can't connect to Arduino on port - "&$CMPort) Exit EndIf _CommSetRTS(0) _CommSetDTR(0) _CommSendString("x" & 128 & "y" & 256 & "e", 1)  
    • By RichardL
      Local $sAxName Local $oMSComm $sAxName = "MSCOMMLib.MSComm.1" $oMSComm = ObjCreate($sAxName) MsgBox(0, Default, StringFormat("Name: %s, Obj %d, Err %d", $sAxName, IsObj($oMSComm), @error)) I'm talking to serial ports (for Arduino) using the MSComm object.  It all runs fine from SciTE or .exe.  If I compile to .a3x the object is not created.  I could manage without .a3x but I like it because it compiles faster.
       
       
    • By willindows
      Hello everyone, I usually use the include commMg.au3 to control the Arduino through some COM port via serial,  in previous versions of Windows until version 8.1 works perfectly. Recently I updated my windows to version 10 and when I use this include no longer works and the error that appears is "Port does not exist." Someone is going through a similar situation? Please can help me solve?
      CommMG.au3
      commg.dll
      testeporta.au3
    • By goldenix
      Edit:
      This topic was solved, see >Post #15 for the codes and setup that worked for me.
       
      Hi
      I downloaded the COMMGvv2.zip & CommgExample.au3 From >this topic.
      Ran the example GUI with default parametres, in the Send text field entered number 1 & pressed Send button. Sending 1 as char worked, the LED on my Arduino Leonardo board went on, then I sent 0 & led went off, just the way I programmed the board.
      But I can not figure out how to make a custom code, a  little help would be appreciated. Please.
      my port: COM 25 baud: 9600 data bits: 8 stop bits: 1 parity: 1 flow control: 0 MY code so far: (consolewrite returns 0)
      #include <GUIConstants.au3> #include 'CommMG.au3';or if you save the commMg.dll in the @scripdir use #include @SciptDir & '\commmg.dll' $iPort = 25             ; COM 25 $sErr = 'errormsg' $iBaud = 9600 $iBits = 8 $iPar = 0 $iStop = 1 $iFlow = 0 $RTSMode = 0 $DTRMode = 0 $resOpen = _CommSetPort($iPort, $sErr, $iBaud, $iBits, $iPar, $iStop, $iFlow, $RTSMode, $DTRMode) ConsoleWrite($resOpen & @LF) _CommSendstring('1')
×
×
  • Create New...