Arduino

  1. 6 years ago

    matt H

    20 Jun 2013 Pre-Release Testers, Xojo Pro

    Has anyone interfaced to an arduino before? Advice and basic steps appreciated...

    Matt

  2. Timothy L

    20 Jun 2013 Pre-Release Testers

    The Arduino will show up as a serial device - try running the Serial Line Indicator example in Communications examples to get started, and to identify the port.
    The Arduino itself sees the USB connection as serial, and the App and Arduino can talk back and forth. You can use serial for data & command transfers, but not for loading software to the Arduino, as far as I can tell.

  3. Wayne G

    20 Jun 2013 Pre-Release Testers, Xojo Pro New Zealand axisdirect.nz

    Hi Matt

    Yes I have done this. I added a serial port to a web application then send commands to the Arduino via this. The only gotcha was I needed to use a memoryblock to assemble the command(s).

  4. I've also done this. Didn't use a memory block, just used simple ascii messages to communicate between the Arduino and the application.

  5. matt H

    20 Jun 2013 Pre-Release Testers, Xojo Pro

    ok, that worked. thanks. Having trouble converting ASCII string to an integer on the Arduino though...

  6. Wayne G

    20 Jun 2013 Pre-Release Testers, Xojo Pro New Zealand axisdirect.nz

    I use

    Dim m As New MemoryBlock(1)
    m.Int8Value(0) = 1
    Dim s As String = m
    Arduino.Write s
    Arduino.Flush

    Where Arduino is the name of the SerialPort

  7. Tim H

    20 Jun 2013 Pre-Release Testers Portland, OR USA

    How about

    dim s as String = chrb(1)
    Arduino.Write s

    or

    Arduino.Write chrb(1)

  8. Derk J

    20 Jun 2013 Pre-Release Testers, Xojo Pro

    @matt H Has anyone interfaced to an arduino before? Advice and basic steps appreciated...

    Matt

    Yes i have..;)

    Serial must be set to (8-N-1):

    Serial1.Baud = Serial.Baud9600 'This is the default arduino baud, you may go for a higher value
    
    Serial1.Bits = Serial.Bits8 
    Serial1.Parity = Serial.ParityNone
    Serial1.Stop = Serial.StopBits1
    
    Serial1.DataCarrierDetect = False
    Serial1.CTS = False
    Serial1.DTR = False
    Serial1.XON = False

    That should be it. You set the baud rate to the same value as the arduino.
    If you let me know what the exact thing is you want to do and/or have questions just ask.

    You can use ASCII or UTF8 (default Xojo string encoding) to send data.
    You may also use HEX or Binary (ChrB() function)

  9. Derk J

    20 Jun 2013 Pre-Release Testers, Xojo Pro

    @Wayne G Hi Matt

    Yes I have done this. I added a serial port to a web application then send commands to the Arduino via this. The only gotcha was I needed to use a memoryblock to assemble the command(s).

    That's not really true.
    Your better off setting the Encoding to ASCII for the strings, and read them as ASCII as well.
    It's not required (at least in my experience) to have memoryblocks.

  10. Derk J

    20 Jun 2013 Pre-Release Testers, Xojo Pro

    @matt H ok, that worked. thanks. Having trouble converting ASCII string to an integer on the Arduino though...

    on the arduino side you use the wiring code:

    int myInt = 0;
    myInt = int(stringvaluehere);

    Link: http://arduino.cc/en/Reference/IntCast

  11. 5 years ago

    Daniel B

    12 Mar 2014 Pre-Release Testers, Xojo Pro Switzerland

    I did a Telnet interface that hooks on the TCP/IP port. But it could as well serve on the serial port.
    It accepts commands like "A0,?" and replies with "A0,2.345" means it measures the voltage on A0 port
    it uses the commands "I, ?, F, A, P, D, V and E"
    I = Identification
    ? = Help
    F=Function Call (user defined function)
    A=Analog Input Port
    P=Pwm-Port
    D=Digital-Port (Input or output)
    V=Variable (iser defined variable)
    E=Error
    It got a bit to big (26k) so it does not run on all Arduinos right now, if anyone has interest to join in, let me know

  12. Derk J

    12 Mar 2014 Pre-Release Testers, Xojo Pro

    Hi daniel,

    I see, this looks very simple.
    I've had such protocols wich works very well.

    Once you have created a class wich is usable in TCPSocket, Serial and more other classes, it makes sense to have it working on those.

  13. Mario P

    12 Mar 2014 Pre-Release Testers, Xojo Pro

    Hi guys, I have a couple of questions on the Arduino.
    Can you write a program in RealBasic and transfer it to the Arduino controller and run it, instead of using the Arduino IDE? or can you just send commands in "real-time"?

    How do I know what commands to send to the Arduino?

    Thanks for any input. I just got my Arduino board a week ago and it would be great if I can write a program in Realbasic that sends commands to the Arduino in realtime.

  14. Jason K

    12 Mar 2014 Pre-Release Testers

    @Mario P Can you write a program in RealBasic and transfer it to the Arduino controller and run it, instead of using the Arduino IDE? or can you just send commands in "real-time"?

    How do I know what commands to send to the Arduino?

    You won't be able to upload RB/Xojo programs to the Arduino. Instead program it in the Arduino IDE so that it will accept serial commands and you will be able to send commands in real time to the Arduino. The serial commands can be anything you want them to be: you could send words, letters, bytes or other information and have your Arduino program react based on what it receives.

  15. Jaap C

    14 Mar 2014 Pre-Release Testers, Xojo Pro Europe, Holland

    Can you write a program in RealBasic and transfer it to the Arduino controller and run it, instead of using the Arduino IDE? or can you just send commands in "real-time"?

    There is no Xojo compiler for the Arduino compatible MCU's.

    Can you give some more info about what you want to do?

  16. James P

    3 Oct 2014 Pre-Release Testers, Xojo Pro Austin/Cedar Park, Texas

    You might want to have a look at this: http://www.86duino.com/index.php?p=68
    I have one of the Zeros now and will be testing it. So far, though I'm having trouble getting a Linux distro to boot into SSL on it. As soon as I get these kinks worked out, I am going to try getting XOJO console apps working on it.

  17. Kato G

    3 Oct 2014 Pre-Release Testers Europe (Norway)
    Edited 5 years ago

    Like!
    I'm doing exactly that also.
    Embedded Xojo

  18. James P

    3 Oct 2014 Pre-Release Testers, Xojo Pro Austin/Cedar Park, Texas

    Do you mean you have a Zero working? I can't seem to get mine to log onto my network using the Linux kernel I got off of their Forum.

  19. Kato G

    3 Oct 2014 Pre-Release Testers Europe (Norway)
    Edited 5 years ago

    http://embeddedxojo.blogspot.no/?m=1

  20. Newer ›

or Sign Up to reply!