Search Unity

Uniduino - Arduino for Unity

Discussion in 'Works In Progress - Archive' started by edwon, Dec 27, 2012.

  1. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    266
    Now available on the Unity Asset Store! https://www.assetstore.unity3d.com/#/content/6804



    // UNIDUINO - ARDUINO FOR UNITY

    • Make your game an experience. Connect Arduino to Unity with Uniduino.

    • Extensible. Use any electronic input or output that can connect to Arduino.

    • Easy to use. Simple, Arduino-like code.

    • Cross-platform. Works exactly the same on Mac and PC.

    • Uniduino is a work-in progress. We're here to gauge interest. Please post your thoughts!

    Uniduino 1.2 has arrived on the asset store! We've got tutorials, playmaker support, and bug fixes. First up...

    NEW TUTORIALS!
    I decided to try a new format for the tutorials (text interspersed with gifs) It combines the speed of text tutorials with the visual clarity of video. I think it's pretty awesome, but let me know what you think on this thread!
    http://www.uniduino.com/tutorials/

    Using a Servo
    http://www.uniduino.com/kb/servo/

    Using a Potentiometer with analogRead
    http://www.uniduino.com/kb/potentiometer/

    Using a Button with digitalRead
    http://www.uniduino.com/kb/button/

    PLAYMAKER!

    Now you can use Uniduino with Playmaker! No programming required! The custom actions are included in the asset store package. Check out the tutorial below.

    Playmaker
    http://www.uniduino.com/kb/playmaker/


    // ABOUT THE DEMO

    The demo game for this video was made in Unity using C# and connected to Arduino with Uniduino and about a dozen lines of code to sync the in-game events with the fan and the lights. Hardware used: Arduino Uno, 1 fan, 6 lights, 2 solid state relay's (as a connector between the fan/lights and arduino), 1 ps3 controller, 1 hdtv.
     
    Last edited: Aug 14, 2013
  2. marcoantap

    marcoantap

    Joined:
    Sep 23, 2012
    Posts:
    225
    Looks great. It will help to develop a huge amount of interesting projects, thank you!
     
  3. holyjewsus

    holyjewsus

    Joined:
    Mar 7, 2011
    Posts:
    624
    Thank you, so, much....!!!

    are you actually programming the aruduino from unity, or just interacting with arduino code running on the micro?
     
    Last edited: Dec 27, 2012
  4. mktwo

    mktwo

    Joined:
    Dec 23, 2012
    Posts:
    10
    Ooh, sounds nifty!

    Also, that video is quite funny! :D
     
  5. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    266
    To answer your question, Uniduino allows Unity to interact with software running on the Arduino board (which we'll provide as part of the package of course) Unity then communicates with the arduino in real time over USB.
     
    Last edited: Dec 27, 2012
  6. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,039
    Oh, that is brilliant!
     
  7. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Maybe a sentence about what Arduino for the less... knowledgeable.
     
  8. Paradigm-SW

    Paradigm-SW

    Joined:
    Dec 23, 2011
    Posts:
    402
    Oho. Colour me interested.
     
  9. afastrunner

    afastrunner

    Joined:
    Jul 2, 2012
    Posts:
    28
    Check out http://arduino.cc/
     
  10. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    266
    from arduino.cc:

    "Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments."

    as far as using Arduino with Unity, there are really 2 major categories of possibility

    • custom controllers / input (flex sensors, temperature sensors, switches, knobs, etc...)
    • real world feedback / output (fans, lights, fog machines, motors etc...)
     
    Last edited: Dec 27, 2012
  11. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    266
  12. JoeVoxel

    JoeVoxel

    Joined:
    Sep 28, 2012
    Posts:
    127
    God bless you !
    It has been a lot of time that I was looking for such a plug in !
    Can't wait to see the progress !
    https://www.youtube.com/watch?v=5GjZz2MAclM
    I'm using "Processing". It's great but it doesn't offer the graphic possibilities of Unity.


    Great job.
     
  13. dpentecost

    dpentecost

    Joined:
    Apr 3, 2009
    Posts:
    136
    Uniduino is a great idea. Looking forward to seeing how it works on a Mac - there's been a serial bug in Unity ports for a long time that makes this difficult.

    Esplora - I've been working with it for a few days and have hacked an OSC sketch in Processing to send all its data - accelerometer, slider, buttons, joystick, light sensor, microphone (temp sensor in next version) - to Unity or any program that understands OSC. The Unity demo project to listen to it is on its way but you can check out the Processing sketch here:

    http://domebase.s3.amazonaws.com/Esplora/ProcessingEsploraOSC2.zip

    It's a first hack but it works.

    Keep me posted about Uniduino.
     
  14. UnknownProfile

    UnknownProfile

    Joined:
    Jan 17, 2009
    Posts:
    2,311
    Oh, this looks interesting indeed.
     
  15. andreimarks

    andreimarks

    Joined:
    Jul 12, 2012
    Posts:
    2
    I am breaking my vow of lurker silence to let you know that I am interested.

    Edit: Very interested.
     
    Last edited: Dec 31, 2012
  16. UnknownProfile

    UnknownProfile

    Joined:
    Jan 17, 2009
    Posts:
    2,311
    Welcome to the community
     
  17. Code_Of_Honour

    Code_Of_Honour

    Joined:
    May 28, 2012
    Posts:
    293
    Wow. This looks surprisingly awesome. WANT.
     
  18. JaZois

    JaZois

    Joined:
    Dec 16, 2012
    Posts:
    10
    This looks awesome!
     
  19. tatelax

    tatelax

    Joined:
    Feb 4, 2010
    Posts:
    1,168
    This looks really cool. Any idea when this would come out?
     
  20. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    266
    We don't have a release date yet as we posted the video just to gauge interest. We started with the question "would anyone want this besides us?" and the answer has been an overwhelming YES!

    Me and Lazer (the programming genius behind Uniduino) are currently re-arranging our schedules to make this happen as soon as possible.

    Of course I'll update this thread as we make progress.

    - EDWONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
     
  21. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    266
    The issue with the Mac serial port was the bug that inspired this project! But even if that were fixed, we still wanted a simple, more user friendly way to connect Arduino to Unity. And we wanted it to work the same on a Mac and a PC. Hence, UNIDUINO was born!
     
  22. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    How does the api work and what are supported on the Arduino?
    A list of supported hardware functions would be nice, like PWM, i2c, spi and stuff like that?
    Very cool project!
     
  23. MibZ

    MibZ

    Joined:
    Sep 4, 2012
    Posts:
    11
    Ridiculously awesome, since I first read about Arduinos I've wanted to make something with them but never had a feasible project idea...now I need to make a game using this after watching the trailer.

    Keep us posted! :D
     
  24. squirr3lz

    squirr3lz

    Joined:
    Jan 11, 2013
    Posts:
    10
    +1 to interest!

    Yea a list of what is supported atm would be nice
     
  25. nRp

    nRp

    Joined:
    Jan 22, 2013
    Posts:
    2
    I'll echo everyone else's enthusiasm. This project is very worthwhile. I would happily pay a few bucks for a plugin that lets me get rid of the Processing proxy I currently use to do this type of stuff.

    1 request: Please don't require Arduino to be running Firmata. It really limits the interaction.
     
  26. e-bonneville

    e-bonneville

    Joined:
    Mar 15, 2010
    Posts:
    76
    This looks really interesting. Will be checking back!
     
  27. trelobyte

    trelobyte

    Joined:
    Nov 17, 2010
    Posts:
    54
    Looking forward to this one !!!! looks really cool !! Serial port on mac is so buggy...
     
  28. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    I tried to use the code in the zip file but I think that I'm missing code that is supposed to be uploaded to the Esplora board. I get the picture of the board on the computer screen but nothing happens when I touch the controls on the board.

     
  29. xandeck

    xandeck

    Joined:
    Apr 2, 2009
    Posts:
    563
    I am interested in this too :)
    Is it available already?
     
  30. dpentecost

    dpentecost

    Joined:
    Apr 3, 2009
    Posts:
    136
    jeffmorris1956 - Try the Esplora Remote sketch for the Arduino, the one that is on the Arduino site. I'm away from my Esplora stuff at the moment (out of the country) but I will go back and see what I did when I get home.
     
  31. dpentecost

    dpentecost

    Joined:
    Apr 3, 2009
    Posts:
    136
    jeffmorris1956 - Just looked at the Processing sketch. Here's what I put in the comments at the beginning of the sketch (you must have seen them):

    To test OSC output, first load the Esplora Remote sketch on
    the Esplora, then run an OSC monitoring program such as Osculator

    http://www.osculator.net/

    You will see messages such as /esplora/x - the OSC
    message for the accelerometer x data

    With Esplora plugged in, this sketch running in Processing, and
    Osculator running, you should see each of the Esplora control messages
    pop up on Osculator's monitoring display.

    This version (2) still draws the Esplora itself in Processing.
    A future version will remove this display and optimize code.



    So if you have the Esplora Remote sketch loaded, Processing should be putting out OSC. I was running it on a Mac and monitoring it with Osculator, a Mac app. YMMV as they say.
     
  32. RJ420

    RJ420

    Joined:
    Jan 13, 2013
    Posts:
    4
    Nice can't wait for this I already have an arduino uno :)
     
  33. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    I found out that Osculator is for Apple computers. Is there similar program for Windows computers?
     
  34. trelobyte

    trelobyte

    Joined:
    Nov 17, 2010
    Posts:
    54
    edwon give us a shout if you need any help with the beta testing ...i have 4 arduinos around ;) 2 unos, 1 mega, 1 fio...i would be more than happy to help!
     
  35. GiantGrey

    GiantGrey

    Joined:
    Jul 2, 2012
    Posts:
    266
    Looking awesome! I'm really interested in this!
    When will it be available?
     
  36. TechDevTom

    TechDevTom

    Joined:
    Oct 21, 2011
    Posts:
    33
    This would be absolutely amazing, I've not got an Arduino but if this came out then I would immediately buy one, I've been wanting to hook up lots of analog sensors to Unity for a while now and such a plugin/tool would allow me to so very easily. There are some very interesting kits that are coming out for the Arduino recently that could revolutionise how games are played, especially in relation to the human body (which I'm very interested in), so as soon as this comes out let me know!

    How much would you guys think about selling this for? Have you done any other work or plugins? Be great to hear from you!
     
  37. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    266
    Hi TSLoire,

    We haven't settled on a price yet, we're going to wait until we release as the Unity team apparently advises you on a fair price when you upload your plugin.

    Everyday we get closer to releasing this, can't wait to see what people do when they combine Unity and Arduino!

    P.S. we're working with Playmaker to get Uniduino support working, which would make it really easy for non-programmers to use Uniduino!
     
    Last edited: Feb 11, 2013
  38. TechDevTom

    TechDevTom

    Joined:
    Oct 21, 2011
    Posts:
    33
    Hey Ewon,

    That sounds fair enough, I'd say most things on the asset store are reasonably priced, I'm sure your plugin will be worth every penny =) I've been wanting to link biometrics up to games, so I'll be doing that, but I can see people controlling robots from their PC's and who knows what else.

    So Uniduino will have Playmaker support too? Sounds like a good plan, most things do these days, either that or support for something that's like Playmaker. I hope you guys are writing a comprehensive API manual for this =P With some things out there you really have to go digging to find information about what you're using!
     
  39. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    This is a great idea, colour me interested
     
  40. nicolas78

    nicolas78

    Joined:
    Sep 18, 2012
    Posts:
    7
    I am also very interested about that.
    Looks fantastic.
    Will it work on Indie version of unity or only Pro one ?
     
  41. TechDevTom

    TechDevTom

    Joined:
    Oct 21, 2011
    Posts:
    33
    Pssst Edwon, where did you go, I wants more information and updates =| I hope this wasn't a practical joke =(
     
  42. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    266
    Edwon is hard at work on Uniduino. We're aiming to release by the end of February! (fingers crossed)
     
  43. TechDevTom

    TechDevTom

    Joined:
    Oct 21, 2011
    Posts:
    33
    The end of February! Ok then, I'll keep my eye out, I eagerly await news about this project =D
     
  44. pixoloco

    pixoloco

    Joined:
    Dec 22, 2011
    Posts:
    47
    Uniduino is definitly something i'd like to play with.
    My last use of arduino was with flash, processing and sockets to make the link. Lets just say that I sincerely hope to never have to do that again.
     
  45. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Just a bump to make it quite clear how terribly interested i am in this
     
  46. GiantGrey

    GiantGrey

    Joined:
    Jul 2, 2012
    Posts:
    266
    well today, is the end of february... ;)
     
  47. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    For anyone unclear on what arduino is http://arduino.cc

    Integration with unity would let you make your own peripherals for your games, in a fairly straightforward manner i would imagine
     
  48. TechDevTom

    TechDevTom

    Joined:
    Oct 21, 2011
    Posts:
    33
    I'm sure Edwon is hard at work trying to meet all our expectations. It may not be finished by the end of today, but as long as it comes out within the next couple of months I'll be perfectly happy! Definitely up for Beta testing =D Update us all please soon!
     
  49. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    266
    Hey everyone! We are indeed hard at work testing Uniduino on Mac and PC. The package itself is basically finished, and we're now focusing on creating documentation and tutorials. I'm sorry to make everyone wait a little longer, but I want to be sure we release a quality product. I'm sure you'll agree!
     
  50. TechDevTom

    TechDevTom

    Joined:
    Oct 21, 2011
    Posts:
    33
    Dunno what anyone else thinks, but I've seen loads of very good plugins and packages that do what they are meant to but have either really poor tutorials and support or no support at all. It's all very well being able to message someone on a forum, but if you're going to release a plugin or a package then make sure you have proper API documentation and demonstrations. If it takes a little while longer to release because you're making comprehensive documentation for it then I say good on ya!