Simulated physical system using HTML / JS - get sensors states / set actuators states from Python code

15 views
Skip to first unread message

Sébastien Celles

unread,
Feb 16, 2015, 9:00:36 AM2/16/15
to autob...@googlegroups.com
Hello,

I simulated a little physical system with 4 actuators MOVE RIGHT/LEFT/UP/DOWN
and 4 sensors (right/left/top/bottom).
see obj.html - you can use j k h n keys to move it.

I would like to get sensors state from Python code.
I have no experience with Crossbar neither Autobahn (neither Twisted)
I also have no experience with NodeJS also
but I have good Python knowledges.

I'm looking for some help to get sensors states on Python side.

Any help is welcome.

I'm also looking for changing actuators states from Python code.

Is there someone here who could give me some tips to achieve this ?

My goal is to be able to have a board with GPIO connected to a computer
which will be able to move this object according inputs.
Ouputs of boards will "display" sensors states.
I will use Pingo http://www.pingo.io/

Kind regards

Sébastien
obj.html

Alexander Gödde

unread,
Feb 16, 2015, 11:04:26 AM2/16/15
to autob...@googlegroups.com
Hi Sébastien!

To use Crossbar.io and Autobahn, you don't need any knowledge of NodeJS or Twisted.

Crossbar.io requires Twisted, but this is a dependency only, not something you come into contact with. If you're using Python 2.7, then installing is nothing more than `pip install Python` (OK, on Windows you also need pywin32. If you're using Python >=3.3, then you'll need to install Python 2.7 in parallel (use virtualenv to run them in parallel), since Twisted doesn't yet support Python 3.

Crossbar.io then does WAMP routing for any language for which a WAMP client library exists - in your case Python via Autobahn|Python. So no need to do anything NodeJS.

Autobahn|Python does not require Twisted, and thus runs on both Python 2 & 3.

Hope this helps clear up things regarding Crossbar.io & AutobahnPython.

Regards,

Alex

Tobias Oberstein

unread,
Feb 17, 2015, 1:39:03 AM2/17/15
to autobahnws

There is a complete example for 2 way comms to GPIO on the Pi : https://github.com/crossbario/crossbarexamples/tree/master/device/pi/gpio

No docs though the code is pretty straight.

Sent from Mobile (Google Nexus 5)

--
You received this message because you are subscribed to the Google Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autobahnws+...@googlegroups.com.
To post to this group, send email to autob...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/fbb991a1-7289-4a67-91ef-8492047dabf4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

s.ce...@gmail.com

unread,
Feb 17, 2015, 1:47:39 AM2/17/15
to autob...@googlegroups.com
Thanks

--
You received this message because you are subscribed to a topic in the Google Groups "Autobahn" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/autobahnws/Dh0Tr2pozy4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autobahnws+...@googlegroups.com.

To post to this group, send email to autob...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages