Jump to content

Search the Community

Showing results for tags 'arduino'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Member Title




Found 11 results

  1. 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!!
  2. 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')
  3. 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)
  4. 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
  5. 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)
  6. 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.
  7. hi! i made the basic native arduino functions in autoit to control it trougth the serial port. it could be interesting for too many people you can find the codes here in my blog there are some more codes using arduino and autoit too xapus.blogspot.com
  8. I've tried to send 4 byte message via MSComm control VB and in AutoIt. Message is "*A<msb><lsb>". This code works in VB with any value 0 or 1 in msb, and 0 to 255 in lsb. .Output = "*A" & Chr(0) & Chr(ix) In AutoIt this works, but not if either byte is zero, and not if lsb is 1. $sAxName = "MSCOMMLib.MSComm.1" $obj = ObjCreate($sAxName) With $obj .CommPort = 31 .Settings = "9600,N,8,1" .PortOpen = True .NullDiscard = False .NullDiscard = True .HandShaking = 0 .InputMode = 1 .DTREnable = True .EOFEnable = False .RTSEnable = True EndWith For $iCnt = 0 To 15 With $obj .NullDiscard = False $sMsg = "*A" & Chr(0) & Chr(Int($iCnt)) .Output = $sMsg If $iCnt < 3 then MsgBox(0, Default, $iCnt) EndIf EndWith Sleep(200) Next You might expect .NullDiscard to be relevant. The VB works with this true or false, and I've tried both in AutoIt. It's possible that I have some other property different, but I've looked through them all. I wonder if AutoIt is passing the whole string to the control, or stopping at the zero. I can't think how to prove that either way. Chr(Int($iCnt)) works correctly for values > 2, but for 1 it doesn't do the same as Chr(1) - what am I missing here?
  9. Ok, I don't know if this is even possible but some help would be greatly appreciated. I've been googling like crazy and trying different things but i'm just not getting anywhere. I'm trying to control an arduino from an Autoit script ... over the web. I have a script that is working and i have serial communication figured out. currently the script is simple and turns a couple of relays on and off. what i'd like now is to do this from a webpage. ideally a gui interface like the one i have now would be great but i've also tried using cgi to launch a script that turns on a relay (so two links one to run a script to turn on and one to turn off) but after the script runs i get an error page. I'd like to set it up where if i can't have the gui then i can click the link run the script but stay on the same page. I hope all of this is making sense. Here is a copy of the gui script that is working: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Change2CUI=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;Include the Serial UDF #include 'CommMG.au3' #include #include #include #include #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 301, 221, 192, 124) $Label1 = GUICtrlCreateLabel("Circuit 2", 32, 88, 42, 17) $Label2 = GUICtrlCreateLabel("Circuit 1", 32, 32, 42, 17) $Checkbox1 = GUICtrlCreateCheckbox("ON", 32, 56, 33, 17) $Checkbox2 = GUICtrlCreateCheckbox("OFF", 72, 56, 41, 17) GUICtrlSetState(-1, $GUI_CHECKED) $Checkbox3 = GUICtrlCreateCheckbox("ON", 32, 112, 33, 17) $Checkbox4 = GUICtrlCreateCheckbox("OFF", 72, 112, 41, 17) GUICtrlSetState(-1, $GUI_CHECKED) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ;Internal for the Serial UDF Global $sportSetError = '' ;COM Vars Global $CMPort = 4 ; Port Global $CmBoBaud = 9600 ; Baud Global $CmboDataBits = 8 ; Data Bits Global $CmBoParity = "none" ; Parity Global $CmBoStop = 1 ; Stop Global $setflow = 2 ; Flow ;Start up communication with the Arduino _CommSetPort($CMPort, $sportSetError, $CmBoBaud, $CmboDataBits, $CmBoParity, $CmBoStop, $setflow) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _commsendstring("10" & @CR) _commsendstring("20" & @cr) Exit Case $Checkbox1 guictrlsetstate($Checkbox1, $GUI_CHECKED) GUICtrlSetState($Checkbox2, $gui_unchecked) _CommSendstring("11" & @CR) Case $Checkbox2 GUICtrlSetState($checkbox2, $GUI_CHECKED) GUICtrlSetState($Checkbox1, $gui_unchecked) _CommSendString("10" & @CR) Case $Checkbox3 guictrlsetstate($Checkbox3, $GUI_CHECKED) GUICtrlSetState($Checkbox4, $gui_unchecked) _CommsendString("21" & @cr) Case $Checkbox4 guictrlsetstate($Checkbox4, $GUI_CHECKED) GUICtrlSetState($Checkbox3, $gui_unchecked) _commsendstring("20" & @cr) EndSwitch WEnd Thank you in advance
  10. Greetings! I've been toying around with a project for my boss.... Basically he saw this from a customer/friend's blog post: http://blog.vmfarms.com/2011/10/how-we-solved-remote-employee-problem.html and tasked me with building this (lucky me). He supplied the wood frame, and the arduino, and same "here, it's easy!" I'm not good with TCP/IP and Python in windows, so I've fallen back on my favorite windows language, autoit, to make a simle solution for my boss. I've got an arduino board connected via a serial connection (CommMG.au) working with an AutoIt Script to accept keyboard input for left/right control over a servo which rotates the laptop, but I can't figure out a way to communicate over the internet with an autoit script. Currently I'm thinking if I can access an instant messanging UDF, I could possibly open a chat session between two auto it scripts (one running on the arduino controlled platform, and the other running on a host machine, with an open skype session). Once I have the session open, I could setup a script on the client machine to send a message via the chat session telling the other script what to do. Has this ever been done? am I over-complicating things? I've seen an IRC udf which permitted the sending of messages to a channel, which could be an option, but I didn't see a way to read messages from a channel, If I had that, I could solve my problem pretty easily
  11. The latest version of the GUI Programmer: Vesion Changes : 0.22) Bug fixed when loading Rule for modifying 0.23) Adds the ability to set a Counter to a fixed value so that the user can "reset" the value of a Counter 0.24) Bug fixed: used to add a space infront of the Counters in inputs causing problems to simulator Fixe the _check_syntax() function to accept 0 as value when output is a counter 0.25) - Prevent user entering a pin name containing the words "Virtual_Coil" or "Counter" because causes problems on the function _update_rule_combos_others() - Adds the autocomplete choise when apllying a new rule, which automatically creates another opposite rule For example: if a rule is * Pin_0 = HIGH ==> Pin_5 = HIGH * then the rule * Pin_0 = LOW ==> Pin_5 = LOW * will be automatically created 0.26) - Changed the generated code regarding Counters (each Counter will increase or dicrease only on input toggle) 0.27) - Show the Project name on the window title - Help is available under "Help-How to" 0.28) - The settings combos are disabled only if they have been used inside a Rule 0.29) - Adds the abbility to use an Output as Input (Further testing required) 0.30) - Bug fixed: Pin_A5 was not updated to the rule combos - New feature that enables user to compare 2 analog pins - Improve the generated code conserning the expression feature. (Use of the constrain() Arduino command to limit the values and not if...then) - Improve the generated code conserning analog inputs. (Map the values of AI to a range of 0-255 when reading the pin and not when writing the corresponting output. By doing the mapping at the begining there is no need to remap when comparison of analog pins) - Change the header(top line) of the saved project (This is done so older versions of Arduino Simulator(V0.06 and below) wont open projects with the comparison feature, because they can't handle the rules.) - Bug fixed: Wrong project name when "save as" 0.31) - Minor change in the order of the comparator when comparing analog pins (Division is the default selection) - Show tip text associated with the controls 0.32) - Prevent user entering a pin name containing the character "", because it is used as delimiter at the "Boole calc" function and may create problems. - Bug fixed: When the number of created rules where over 30 they didn't fit at the rule selection combo. Now a scrollbar appears if needed - Three new alternative ways to create rules are added: 1) Boolean Calculator: A calculator like GUI Window that allows the user to create Logical (Boolean) Expressions which are automatically transfered to Rules. 2) Boolean Truth Table (2 Inputs): A Truth Table ready for 2 inputs and 1 output. The entered data are automatically transfered to Rules. 3) Boolean Truth Table (custom Inputs): A generalized Truth Table able to handle more inputs (1-9) 0.33) - Add a space option along with the "AND" and "OR" options in the rule combos - Bug fixed: When the number of inputs is three and above then the opossite rules regarding Virtual Coils are also created. - Bug fixed: Changed the way that counts the open and closed parentheses in the _create_output_from_bool_expression function - When using Bool calculator, user can create an expression with an "Not" in the output to invert the output - Bug fixed: Button 13 on Bool Calculator was not functioning. (An empty label was overlaping) - Changed the symbols for "AND" , "OR" on boole calculator. Now the symbols are: AND -> "*" OR -> "+" - Remove the counters from the combos on bool functions 0.34 - Add the "Preview Truth Table" feature on the Bool Calculator - Some syntax check of the expression in the Bool Calculator - In the "Boolean Truth Table (Custom Inputs)" tool all the possible states of inputs are automatically created - Change the label showing the maximum number of inputs on the "Boolean Truth Table (Custom Inputs)" tool according to the daclared Digital Inputs - Add the "Fill Inputs" button on the "Boolean Truth Table (Custom Inputs)" tool, which automatically sets all the possible states of the inputs - Bug fixed: Program crash when rule was deleted twise - Add a Clear Rules option under the Clear Settings Button 0.35 - Use of a much better way to generate Rules when the "Boole's Calculator" or "Boole's Truth table" are used. The generated Rules and the Virtual Coils used are much less. Arduino Programmer V0.30.au3 Arduino Programmer V0.35.au3 The latest version of the Arduino pseudo simulator: Vesion Changes : 0.02) Counters increase (or dicrease) only when the triger input changes condition 0.03) Bug fixed: Counters were not increased (or dicreased) correctly when the same counter was declared in more than one rule 0.04) Display the type of each pin next to the pin 0.05) Create a list view which shows the rules of the project, so that the user can check on them when testing Show the name of the current project on the window title Bug fixed: Delete the labels that shows the pin state when a second project is opened When the project doesn't have any Rules, Display an error message The How to... under the help menu is active 0.06) Show the pin name next the pin 0.07) Corrections made to handle the new "Compare" feature 0.08) Show control tips when mouse hovers over them 0.09) User can view in real time the states and values of Virtual Coils and Counters Arduino Simulator V0.07.au3 Arduino Simulator V0.09.au3 And some simple examples: Examples.zip Looking forward for comments and recomentations. Thank you all very much
  • Create New...