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

#1

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 (12.4 KB)

0 Likes

#2

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

···

Am Montag, 16. Februar 2015 15:00:36 UTC+1 schrieb Sébastien Celles:

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

0 Likes

#3

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)

Am 16.02.2015 17:04 schrieb “Alexander Gödde” alexande...@googlemail.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

Am Montag, 16. Februar 2015 15:00:36 UTC+1 schrieb Sébastien Celles:

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

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.

0 Likes

#4

Thanks

···

2015-02-17 7:39 GMT+01:00 Tobias Oberstein tobias.o...@gmail.com:

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)

Am 16.02.2015 17:04 schrieb “Alexander Gödde” alexande...@googlemail.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

Am Montag, 16. Februar 2015 15:00:36 UTC+1 schrieb Sébastien Celles:

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

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.

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.

To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/CABuE%2BY6JW_r7_HV0dH5k5NgRdqvCeDswuYCv6F9eDbs0j11JQQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

0 Likes