using the bridge to connect arduino yun serial data to the python server

2,355 views
Skip to first unread message

Peter Kalajian

unread,
Nov 24, 2013, 4:19:12 PM11/24/13
to autob...@googlegroups.com
Tobias,

Ok now that I have the example echo client and server running, I'd like to figure out how to use the bridge library to connect the arduino processor's serial datastream to the linino processor running the serial2ws.py server. I wonder if you are willing to take a look a the bridge library over at arduino and see if you can figure out how we can talk to the arduino side. I know there are lots of folks who would like to know. I'd be willing to write a detailed blog post of how I got it to work if you can help.

Cheers,

Pete

Tobias Oberstein

unread,
Nov 24, 2013, 5:13:02 PM11/24/13
to autob...@googlegroups.com
Am 24.11.2013 22:19, schrieb Peter Kalajian:
> Tobias,
>
> Ok now that I have the example echo client and server running, I'd like
> to figure out how to use the bridge library to connect the arduino
> processor's serial datastream to the linino processor running the

As far as I can see, the "bridge" is a fancy layer on top of a plain
serial connection between the MCU and the Linux Mips CPU:

http://jpmens.net/2013/09/23/understanding-arduino-yun-s-bridge/
http://arduino.cc/en/Tutorial/YunSerialTerminal

I guess there is a part of the "bridge" running on the Mips CPU that
will occupy the serial. And I could imagine having a hard time making
this part run as a part of Autobahn/Twisted process.

And further: it's probably not suitable for what you want to do. E.g. it
provides "abstractions" like accessing the filesystem on the Mips from
the MCU.

Personally, I'd rather try to get raw serial transport running. That
will allow you to more or less directly use the serial2ws example.

The "successor" to serial2ws btw is:

https://github.com/tavendo/SRDP

There is only very rough docs, probably have a glance at

https://github.com/tavendo/SRDP/tree/master/arduino/demoboard
https://github.com/tavendo/SRDP/blob/master/doc/SRDP.md

This is much more advanced .. it can bridge generic MCU based devices
via electronic datasheets to WebSocket/WAMP.

All the code (C, Arduiono, Py, etc) is there, but you'll probably be
looking at more advanced stuff than the serial2ws thing .. which is a
quick hack.

It's also unfinished work;) I just have too many thing in the cooking ..

> serial2ws.py server. I wonder if you are willing to take a look a the
> bridge library over at arduino and see if you can figure out how we can
> talk to the arduino side. I know there are lots of folks who would like

Alright. That might be interesting. We're always looking to get more
"visibility". Could you give me a little background on you, your
project, your roadmap/timeline and what community you are networked
with? I mean, I could probably justify order a Yun (well, the 50 bucks
isn't the point;) and invest something like 3 days .. which should be
enough to get the SRDP thingy ported, running and integrated into
Crossbar.io/Autobahn. I won't bother with the serial2ws . it's a hack.
If you get raw serial on Yun working (which I guess should be possible),
it's a matter of modifying that hack to your needs ..

> to know. I'd be willing to write a detailed blog post of how I got it to
> work if you can help.

That would certainly be very welcome! Everything that reaches some
audience .. you don't happen to have thousands of Twitter/FB followers
or something? ;)

/Tobias

>
> Cheers,
>
> Pete
>
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.

Peter Kalajian

unread,
Nov 24, 2013, 7:47:14 PM11/24/13
to autob...@googlegroups.com
Tobias,

Thanks for the quick response. Well, I'm not a super-guru with a big following, but since currently the first big production run of the Yun's sold out quickly, I think there is a growing user base. I am a teacher and teach some basic engineering and programming, but I can write fairly well, and have a blog about my experience on the yun. So far just one post at http://yunadventures.blogspot.com/ with 68 page views in two days, so not a superstar! Of course, I'm sure that we could get the guys at Arduino to post any working example we have and that would get lots of view.  As far as the project so far, I'm really just trying to figure out how to make this websocket thing work, but ultimately I want to put current and voltage monitoring on our school and challenge the students to cut the use. Having sensor data livestreaming on the homepage of the school would serve to raise awareness about energy use.

Cheers,

Pete

Tobias Oberstein

unread,
Nov 25, 2013, 4:44:52 AM11/25/13
to autob...@googlegroups.com
Am 25.11.2013 01:47, schrieb Peter Kalajian:
> Tobias,
>
> Thanks for the quick response. Well, I'm not a super-guru with a big
> following, but since currently the first big production run of the Yun's
> sold out quickly, I think there is a growing user base. I am a teacher

Alright. I found a distributor in Germany that is still in stock and
ordered one. Should arrive next 1-2 day.

> and teach some basic engineering and programming, but I can write fairly
> well, and have a blog about my experience on the yun. So far just one
> post at http://yunadventures.blogspot.com/ with 68 page views in two
> days, so not a superstar! Of course, I'm sure that we could get the guys
> at Arduino to post any working example we have and that would get lots

Getting something on http://blog.arduino.cc/ .. that would be neat!

> of view. As far as the project so far, I'm really just trying to figure
> out how to make this websocket thing work, but ultimately I want to put
> current and voltage monitoring on our school and challenge the students
> to cut the use. Having sensor data livestreaming on the homepage of the
> school would serve to raise awareness about energy use.

That sound like cool project! Raising energy awareness as a school
project. I'd be willing to help.

Well we can certainly help with anything software and cloud related,
though less hardware. Last time I turned on a soldering iron is years
ago;) Regarding the hardware: do you have a sensor board capable of
measuring electric energy consumption already? Or how do you plan to do it?

/Tobias

>
> Cheers,
>
> Pete
>
> On Sunday, November 24, 2013 4:19:12 PM UTC-5, Peter Kalajian wrote:
>
> Tobias,
>
> Ok now that I have the example echo client and server running, I'd
> like to figure out how to use the bridge library to connect the
> arduino processor's serial datastream to the linino processor
> running the serial2ws.py server. I wonder if you are willing to take
> a look a the bridge library over at arduino and see if you can
> figure out how we can talk to the arduino side. I know there are
> lots of folks who would like to know. I'd be willing to write a
> detailed blog post of how I got it to work if you can help.
>
> Cheers,
>
> Pete
>

Peter Kalajian

unread,
Nov 25, 2013, 1:06:08 PM11/25/13
to autob...@googlegroups.com
Tobias,

NO problem on the soldering and electronics. I'm an electrical engineer by training. I will use a current transformer. Here's a good post for what I will do:

Turns out that they posted my blog on the arduino twitter and google plus feed, so this project will certainly get some airplay since the one forum thread on websockets over on the arduino yun blog has 1500 reads. 

Pete

On Sunday, November 24, 2013 4:19:12 PM UTC-5, Peter Kalajian wrote:

Tobias Oberstein

unread,
Nov 25, 2013, 5:06:37 PM11/25/13
to autob...@googlegroups.com
Hi Peter,

Am 25.11.2013 19:06, schrieb Peter Kalajian:
> Tobias,
>
> NO problem on the soldering and electronics. I'm an electrical engineer

Alright;) Thats good. I have a math / comp. science background .. so I
guess we have all the know-how to get that job done;)

> by training. I will use a current transformer. Here's a good post for
> what I will do:
> http://openenergymonitor.org/emon/node/58

I have been reading that post and the code here

https://github.com/openenergymonitor/EmonLib/blob/master/examples/voltage_and_current/voltage_and_current.ino
https://github.com/openenergymonitor/EmonLib/blob/master/EmonLib.cpp

It's easy to follow and it'll be a straightforward to wrap that up into
something that can communicate with Autobahn/Crossbar.io over serial and
expose that in real-time via WebSocket to a HTML5 page where data then
can be rendered in some fancy real-time animated charts.

As a start, I have written a so-called "electronic datasheet" (EDS) for
the open energy monitor:

https://github.com/tavendo/SRDP/blob/master/python/srdp/srdp/eds/devices/energymonitor.json

This is the basis for SRDP. We can then have any number of instances of
above "virtual device" on a single concrete board - like say 4 monitors
to concurrently monitor 4 electrical consumers.

The definition of such a board is done via "adapter EDS" .. whereas
above is "device EDS".

>
> Turns out that they posted my blog on the arduino twitter and google
> plus feed, so this project will certainly get some airplay since the one
> forum thread on websockets over on the arduino yun blog has 1500 reads.

Awesome, well done;)

Btw: the Yun is on the way .. they are fast. Maybe tomorrow or day
thereafter.

Now, ideally, we'd both have not only the same Yun but also the same
open power monitor extension .. otherwise software dev. will be harder
.. no "real" hardware. Do you think you could make me an open power
monitor board (if I'd pay for material) and send it to me? I guess you
are in the US? Or do you see another way?

/Tobias

>
> Pete
>
> On Sunday, November 24, 2013 4:19:12 PM UTC-5, Peter Kalajian wrote:
>
> Tobias,
>
> Ok now that I have the example echo client and server running, I'd
> like to figure out how to use the bridge library to connect the
> arduino processor's serial datastream to the linino processor
> running the serial2ws.py server. I wonder if you are willing to take
> a look a the bridge library over at arduino and see if you can
> figure out how we can talk to the arduino side. I know there are
> lots of folks who would like to know. I'd be willing to write a
> detailed blog post of how I got it to work if you can help.
>
> Cheers,
>
> Pete
>

Peter Kalajian

unread,
Nov 25, 2013, 6:40:49 PM11/25/13
to autob...@googlegroups.com
Tobias, 

Sure, I can make a set of shield boards that would sit on the arduino yun board. Would be cool because we could take power from the voltage transformer thru a voltage regulator to power the yun. I'll put together a bill of material and costs and let you know. 

As far as the bridge code: I see that there are several examples of folks trying to use the tcp port to connect the linux side to the arduino side. Here's the forum thread: http://forum.arduino.cc/index.php?topic=194934.0.

We should probably make a simple test circuit with a potentiometer as voltage divider on an analog pin without any math processing on the yun at first to test the basic bridge websocket. In other words, just read two analog pin A1 , and display the raw value (10 bit resolution) with the smoothy.js implementation. Once we get that up and running, we can continue with the full implementation. Here's basic arduino code (for a simple serial implementation)


Clearly, we won't be using the same sort of serial monitor, but the rest of the code is the idea.

With a simple test like this, we will know quickly whether the websocket can read pin data and post it quickly. 

What do you think?

Pete





  



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

--
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/B3L4N2J7Jac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autobahnws+unsubscribe@googlegroups.com.

Peter Kalajian

unread,
Nov 25, 2013, 7:04:44 PM11/25/13
to autob...@googlegroups.com
Tobias,

Hey, these guys already have a board setup with everything we need, and also if we get the code running, they would love to have it! http://openenergymonitor.org/emon/emontxshield/smt.

I can order a couple of them and put them together, and send you one. 

Pete

Tobias Oberstein

unread,
Nov 26, 2013, 2:52:06 AM11/26/13
to autob...@googlegroups.com
Hi Peter,

Am 26.11.2013 01:04, schrieb Peter Kalajian:
> Tobias,
>
> Hey, these guys already have a board setup with everything we need, and
> also if we get the code running, they would love to have it!
> http://openenergymonitor.org/emon/emontxshield/smt.

Cool! That's even better. I have looked at it .. would order right away,
but have questions .. probably you know?

1)
"""
Apparent Power, Real Power*, Power Factor* and AC RMS voltage readings*
* with 9V AC adapter
"""

Why is it that 3 of the 4 are only available with 9V AC adapter? And
what's that? I mean I know what's an AC Adapter is, but how does that
work in combination with the Yun? Will an 9V AC adapter then power both
the shield and the Yun?

2)
The say all SMD is presoldered .. so I only need to solder the "easy"
stuff like connnectors and such, right? The latter I can let a friend of
mine do .. that would probably be easier than sending the shield from UK
to US, you solder it, and send it to Germany;)

3)
Those "CT Clips" .. what's that? Is it:
http://shop.openenergymonitor.com/100a-max-clip-on-current-sensor-ct/

Can I "clip" those onto standard power wires like to my PC or TV to
measure power? We have 220V here in Germany, will that work also? And
that CT thing doesn't in any way cut into the power wire?

And I can have 4 of those connected to 1 shield to get measurements for
4 consumers at the same time?

And: is it safe? I mean, can I shoot myself tinkering with this stuff? ;)

4)
They say "Expected release date is 1st Dec 2013" .. did you order already?

>
> I can order a couple of them and put them together, and send you one.

If it's non-SMS, I have a friend around the corner here you made this
https://github.com/tavendo/SRDP/blob/master/arduino/demoboard/demoboard.jpg
for us. Probably easier, but thanks for offering!

/Tobias
> http://openenergymonitor.org/__emon/node/58
> <http://openenergymonitor.org/emon/node/58>
>
>
> I have been reading that post and the code here
>
> https://github.com/__openenergymonitor/EmonLib/__blob/master/examples/voltage___and_current/voltage_and___current.ino
> <https://github.com/openenergymonitor/EmonLib/blob/master/examples/voltage_and_current/voltage_and_current.ino>
> https://github.com/__openenergymonitor/EmonLib/__blob/master/EmonLib.cpp
> <https://github.com/openenergymonitor/EmonLib/blob/master/EmonLib.cpp>
>
> It's easy to follow and it'll be a straightforward to wrap that
> up into something that can communicate with Autobahn/Crossbar.io
> over serial and expose that in real-time via WebSocket to a
> HTML5 page where data then can be rendered in some fancy
> real-time animated charts.
>
> As a start, I have written a so-called "electronic datasheet"
> (EDS) for the open energy monitor:
>
> https://github.com/tavendo/__SRDP/blob/master/python/srdp/__srdp/eds/devices/__energymonitor.json
> an email to autobahnws+unsubscribe@__googlegroups.com
> <mailto:autobahnws%2Bunsu...@googlegroups.com>.
> For more options, visit
> https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
> --
> 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/B3L4N2J7Jac/__unsubscribe
> <https://groups.google.com/d/topic/autobahnws/B3L4N2J7Jac/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email
> to autobahnws+unsubscribe@__googlegroups.com
> <mailto:autobahnws%2Bunsu...@googlegroups.com>.
> For more options, visit
> https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
>
> --
> 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.

Tobias Oberstein

unread,
Nov 26, 2013, 3:14:27 AM11/26/13
to autob...@googlegroups.com
Am 26.11.2013 00:40, schrieb Peter Kalajian:
> Tobias,
>
> Sure, I can make a set of shield boards that would sit on the arduino
> yun board. Would be cool because we could take power from the voltage
> transformer thru a voltage regulator to power the yun. I'll put together
> a bill of material and costs and let you know.
>
> As far as the bridge code: I see that there are several examples of
> folks trying to use the tcp port to connect the linux side to the
> arduino side. Here's the forum thread:
> http://forum.arduino.cc/index.php?topic=194934.0.

There seems to be quite some confusion there;)

No, I (currently) think the right direction in this:

http://forum.arduino.cc//index.php?topic=191820.0

There is a TTY started at boot time on the CPU/Linux side that
"occupies" the plain old serial to the MCU.

Above posts talks about how to turn that off, which then opens the
possibility to talk raw serial to the MCU.

This makes sense, and I'd try that first.

And in fact, that's similar to how consumer routers with OpenWRT work,
e.g. Linksys WRT54:

https://forum.openwrt.org/viewtopic.php?id=15165
http://wiki.openwrt.org/toh/linksys/wrt54g#serial.port

The second thing we need to get figured: the Yun has Wifi and Ethernet.
The Wifi: can it act as a _client_ (not AP) connecting to an upstream
Wifi AP? It needs to get an IP address via DHCP and such.

Those 2 issues above are the main "roadblocks" (rgd the software/cloud
side). If we can figure those out, the rest is straightforward:

Have an Autobahn-based gateway started at boot time that talks serial
(SRDP) to the MCU and WAMP to a cloud-based Autobahn server. The HTML5
page will then talk to the latter server. That will get us the real-time
charting.

>
> We should probably make a simple test circuit with a potentiometer as
> voltage divider on an analog pin without any math processing on the yun
> at first to test the basic bridge websocket. In other words, just read
> two analog pin A1 , and display the raw value (10 bit resolution) with
> the smoothy.js implementation. Once we get that up and running, we can
> continue with the full implementation. Here's basic arduino code (for a
> simple serial implementation)
>
> http://arduino.cc/en/Tutorial/AnalogReadSerial
>
> Clearly, we won't be using the same sort of serial monitor, but the rest
> of the code is the idea.
>
> With a simple test like this, we will know quickly whether the websocket
> can read pin data and post it quickly.
>
> What do you think?

Yep, that's fine .. first try to get _something_ working on the Yun:
that would be essentially the serial2ws example ported to the Yun.

2nd: get the SRDP stuff ported.

3rd: Energy monitor.

If we get raw serial working between the MCU and CPU on the Yun, we'll
get the rest done also.

>
> Pete
>
>
>
>
>
>
>
> On Mon, Nov 25, 2013 at 5:06 PM, Tobias Oberstein
> <tobias.o...@gmail.com <mailto:tobias.o...@gmail.com>> wrote:
>
> Hi Peter,
>
> Am 25.11.2013 19:06, schrieb Peter Kalajian:
>
> Tobias,
>
> NO problem on the soldering and electronics. I'm an electrical
> engineer
>
>
> Alright;) Thats good. I have a math / comp. science background .. so
> I guess we have all the know-how to get that job done;)
>
>
> by training. I will use a current transformer. Here's a good
> post for
> what I will do:
> http://openenergymonitor.org/__emon/node/58
> <http://openenergymonitor.org/emon/node/58>
>
>
> I have been reading that post and the code here
>
> <https://github.com/openenergymonitor/EmonLib/blob/master/EmonLib.cpp>
>
> It's easy to follow and it'll be a straightforward to wrap that up
> into something that can communicate with Autobahn/Crossbar.io over
> serial and expose that in real-time via WebSocket to a HTML5 page
> where data then can be rendered in some fancy real-time animated charts.
>
> As a start, I have written a so-called "electronic datasheet" (EDS)
> for the open energy monitor:
>
> https://github.com/tavendo/__SRDP/blob/master/python/srdp/__srdp/eds/devices/__energymonitor.json
> an email to autobahnws+unsubscribe@__googlegroups.com
> <mailto:autobahnws%2Bunsu...@googlegroups.com>.
> For more options, visit
> https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
> --
> 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/B3L4N2J7Jac/__unsubscribe
> <https://groups.google.com/d/topic/autobahnws/B3L4N2J7Jac/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> autobahnws+unsubscribe@__googlegroups.com
> <mailto:autobahnws%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
> --
> 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.

Peter Kalajian

unread,
Nov 26, 2013, 7:34:28 AM11/26/13
to autob...@googlegroups.com
Tobias,

The 9v transformer is so that you can measure the voltage to do the power calculations. Power is voltage X current, so you need both a way to measure the house voltage and a way to measure the house current. You might have to get a 220V ac version of the transformer, but you probably have one sitting around from an old piece of electronics. Think wall wart. 

Looks like the smd parts are already soldered, so just simple through-board soldering. 

The CT (current transformer) is really just a piece of iron wrapped around an AC wire that is inductively coupled so that a small current is generated that is proportional to the current in the wire. You just open it up, clip it around the wire, and shut it. It is non-invasive, meaning you don't have to cut any wires. There are 4 jacks, so you could measure the current (and consequently) power for four separate circuits. It is relatively safe, since you only have to clip it around the wires. I'd cut the main power before I got my hands in the AC distribution box to put these transformers around the wires, but really, there's little danger. 

I think you are correct that it makes sense for each of us to order one. I'll order mine today. 

Cheers,

Pete

On Sunday, November 24, 2013 4:19:12 PM UTC-5, Peter Kalajian wrote:

Tobias Oberstein

unread,
Nov 27, 2013, 3:10:53 AM11/27/13
to autob...@googlegroups.com
Hi Peter,

> The 9v transformer is so that you can measure the voltage to do the
> power calculations. Power is voltage X current, so you need both a way

Not sure I get that:
So the 9v transformer isn't to actually provide power to run the Arduino
board, but only to sense the 110/220v house power line _voltage_?

And if so, that "9v tranformer": if it has an output voltage regulator
that keeps the voltage at 9v strict, how could it be used to sense
variations of the 110/220v supply voltage running into that 9v power
supply? Or does it need to be really only a transformer without any
regulation to make that work?

Mmh. And in any case: even if there would be no voltage regulator in
that 9v thingy, isn't it terribly inaccurate to infere the 110/220v
variations indirectly from variations in the 9v?

/Tobias

Peter Kalajian

unread,
Nov 27, 2013, 8:45:55 AM11/27/13
to autob...@googlegroups.com
Tobias,

The transformer does not have regulation, and it uses the principle of magnetic induction in exactly the same way as the current transformer does, except to measure a proportion of the voltage. So if the 220 volts from the line varies by 2 volts, the output of the transformer will vary by 2 x 9/220 volts in a very proportional way.

I'm not sure about powering the Yun. I looked at the schematic and it is not clear whether they have included a 5 VDC regulator on the board. I have emailed them to ask. If they don't it will be a simple matter to add one.






/Tobias

--
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/B3L4N2J7Jac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autobahnws+unsubscribe@googlegroups.com.

Tobias Oberstein

unread,
Nov 28, 2013, 7:55:07 AM11/28/13
to autob...@googlegroups.com
Hi Peter,

I'm right now still on a business trip, will be back late in the
evening, but the Yun arrived shortly before I had to leave and I had
time for an hour to check it out: here are my findings:

https://github.com/oberstet/scratchbox/blob/master/docs/misc/yun.md

I'll order an open energy monitor board now with 4 CTs, but until that
arrives: do you know if the Yun has some kind of internal/builtin sensor
like an onboard temp. or voltage sensor that we could read out and
connect up to Autobahn etc as a start? So I could make some small
program that will work for both of us ..

Cheers,
/Tobias
> https://groups.google.com/d/__topic/autobahnws/B3L4N2J7Jac/__unsubscribe
> <https://groups.google.com/d/topic/autobahnws/B3L4N2J7Jac/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> autobahnws+unsubscribe@__googlegroups.com
> <mailto:autobahnws%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
> --
> 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.

Peter Kalajian

unread,
Nov 28, 2013, 8:19:27 AM11/28/13
to autob...@googlegroups.com
Tobias. 
There is no onboard sensor, but it is trivial to hook up a thermistor and a resistor in a voltage divider and connect it to an analog pin. I'll send you a link in a minute.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/autobahnws/B3L4N2J7Jac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autobahnws+...@googlegroups.com.

Peter Kalajian

unread,
Nov 28, 2013, 8:25:55 AM11/28/13
to autob...@googlegroups.com
Here's the link to a tutorial using a temperature sensor:

Peter Kalajian

unread,
Nov 28, 2013, 12:29:16 PM11/28/13
to autob...@googlegroups.com
Tobias, I was able to get all the python lobs for autobahn loaded on the flash, but better the way you are doing it.


On Thursday, November 28, 2013, Tobias Oberstein wrote:
To unsubscribe from this topic, visit https://groups.google.com/d/topic/autobahnws/B3L4N2J7Jac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autobahnws+...@googlegroups.com.

Tobias Oberstein

unread,
Nov 29, 2013, 5:17:24 PM11/29/13
to autob...@googlegroups.com
Am 28.11.2013 18:29, schrieb Peter Kalajian:
> Tobias, I was able to get all the python lobs for autobahn loaded on the
> flash, but better the way you are doing it.

Hi Peter,

I've written a (preview) blog post on settings things up on the Yun:

http://tavendo.com/blog/post/arduino-yun-getting-started-part-1/

It would be awesome if you could review that a little, give feedback and
ideally retry that recipe step by step on your Yun after resetting your
Yun (and the Linux thereon) to factory default (which is also described
in the preview post).

The reason is twofold: I think it would be good if we can make sure that
above recipe doesn't contain "bugs" (I did quite some experimenting, and
I'm not sure I wrote down everything correctly). There are enough subtle
steps where things can go wrong, and if the recipe isn't reliable, that
sucks.

And: Honestly, I'm not fully convinced that you got everything installed
cleanly and fully the way you did -- read: I'd actually be surprised if so;)

Ah, pls don't (yet) distribute the link ..

I'll now take on the serial stuff and SRDP.

Cheers,
/Tobias


>
> On Thursday, November 28, 2013, Tobias Oberstein wrote:
>
> Hi Peter,
>
> I'm right now still on a business trip, will be back late in the
> evening, but the Yun arrived shortly before I had to leave and I had
> time for an hour to check it out: here are my findings:
>
> https://github.com/oberstet/__scratchbox/blob/master/docs/__misc/yun.md
> https://groups.google.com/d/____topic/autobahnws/B3L4N2J7Jac/____unsubscribe
> <https://groups.google.com/d/__topic/autobahnws/B3L4N2J7Jac/__unsubscribe>
> autobahnws+unsubscribe@__googl__egroups.com
> <http://googlegroups.com>
> <mailto:autobahnws%2Bunsu...@googlegroups.com>.
> For more options, visit
> https://groups.google.com/____groups/opt_out
> <https://groups.google.com/__groups/opt_out>
> <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>.
>
>
> --
> 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.
> For more options, visit
> https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
> --
> 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/B3L4N2J7Jac/__unsubscribe
> <https://groups.google.com/d/topic/autobahnws/B3L4N2J7Jac/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to

Peter Kalajian

unread,
Nov 29, 2013, 5:21:02 PM11/29/13
to autob...@googlegroups.com
OK, I was just working on following your steps, so I'll continue.

Pete


        an email to autobahnws+unsubscribe@googlegroups.com.

        For more options, visit
        https://groups.google.com/__groups/opt_out
        <https://groups.google.com/groups/opt_out>.


    --
    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/B3L4N2J7Jac/__unsubscribe
    <https://groups.google.com/d/topic/autobahnws/B3L4N2J7Jac/unsubscribe>.
    To unsubscribe from this group and all its topics, send an email to

    For more options, visit https://groups.google.com/__groups/opt_out
    <https://groups.google.com/groups/opt_out>.

--
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

For more options, visit https://groups.google.com/groups/opt_out.
--
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/B3L4N2J7Jac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autobahnws+unsubscribe@googlegroups.com.

Peter Kalajian

unread,
Nov 29, 2013, 11:09:18 PM11/29/13
to autob...@googlegroups.com
Tobias,

Notes following your blog:

  • So far so good. I am through the setting up of the sshfs system, but since I am using a mac system, so getting the sshfs system up and running I went to this site:
  • after the fstab has been modified, the restart command gives this:
    • root@peteyun:~# /etc/init.d/fstab restart
    • umount: can't umount /opt: Invalid argument
    • doesn't seem to matter. I can get the hello.txt to open.
  • you can't use easy_install without getting the distribute package from opkg
  • commenting out the line conditionalExtensions=getExtensions(), is line 54, not 74
OK, all done. Waiting for the next instructions.

Tobias Oberstein

unread,
Nov 30, 2013, 4:29:35 AM11/30/13
to autob...@googlegroups.com
Hi Peter,

thanks a bunch! I've updated the post and fixed the errors / clarified
things.

Am 30.11.2013 05:09, schrieb Peter Kalajian:
> Tobias,
>
> Notes following your blog:
>
> * So far so good. I am through the setting up of the sshfs system, but
> since I am using a mac system, so getting the sshfs system up and
> running I went to this site:
> o http://fortysomethinggeek.blogspot.com/2012/11/sshfs-on-osx-mount-sshsftp-shares-on-mac.html

Link added.

> * after the fstab has been modified, the restart command gives this:
> o root@peteyun:~# /etc/init.d/fstab restart
> o umount: can't umount /opt: Invalid argument

Yep, irrelevant. It's whining since it can't unmount a FS not previously
mounted .. we just added the fstab entry.

> o doesn't seem to matter. I can get the hello.txt to open.
> * you can't use easy_install without getting the distribute package
> from opkg

Uups.

> * commenting out the line conditionalExtensions=getExtensions(), is
> line 54, not 74

Ah, bug.

>
> OK, all done. Waiting for the next instructions.

Will send update today ..

Cheers,
/Tobias

Tobias Oberstein

unread,
Nov 30, 2013, 3:23:19 PM11/30/13
to autob...@googlegroups.com
> OK, all done. Waiting for the next instructions.

Hi Peter,

alright, the real-time charting demo ("serial2ws") now runs on the Yun.

Added a video to the beginning of

http://tavendo.com/blog/post/arduino-yun-with-autobahn/

and a section "Running the Demo" at the end. It has all the steps,
though isn't very elaborate, polished or nice .. but should be enough so
you can do some experiments on your Yun also.

The hard questions are now all answered;) It works.

Now, we can go on with SRDP / Crossbar.io ..

Cheers,
/Tobias


Peter Kalajian

unread,
Nov 30, 2013, 11:12:25 PM11/30/13
to autob...@googlegroups.com
Tobias,

It works! Fantastic. 

 
one change: You give the ip address for your yun. Need to remind folks to put their ip or just my_arduino_name.local:8080.

what does commenting out the inittab line do?

What next?

Pete



/Tobias


--
You received this message because you are subscribed to a topic in the Google Groups "Autobahn" group.

Peter Kalajian

unread,
Nov 30, 2013, 11:45:25 PM11/30/13
to autob...@googlegroups.com
Tobias,

How about adding a slider like http://www.dyn-web.com/code/slider/ to send data to analogwrite to a digital pin for PWM? That would be a good feature for the robotics types to control motors. 

Also it would be lovely to do a google plus hangout sometime so you could walk me through the python code. I'm teaching it to my high school students, but am really quite new to it. 

Cheers,
Pete

Tobias Oberstein

unread,
Dec 1, 2013, 8:44:50 AM12/1/13
to autob...@googlegroups.com
Hi Pete,

> It works! Fantastic.

So it works for you .. great!

>
> one change: You give the ip address for your yun. Need to remind folks
> to put their ip or just my_arduino_name.local:8080.
>
> what does commenting out the inittab line do?
>
> What next?
>

I've included more text in the blog post as you suggest .. also wrt
"whats next" at the very end. The blog post is now public:

http://tavendo.com/blog/post/arduino-yun-with-autobahn/

Cheers,
/Tobias

Tobias Oberstein

unread,
Dec 1, 2013, 9:05:01 AM12/1/13
to autob...@googlegroups.com
Am 01.12.2013 05:45, schrieb Peter Kalajian:
> Tobias,
>
> How about adding a slider like http://www.dyn-web.com/code/slider/ to
> send data to analogwrite to a digital pin for PWM? That would be a good
> feature for the robotics types to control motors.

Yes, this can be done trivially. I'd recommend to go with the new HTML5
slider element:

<input type="range">

http://www.html5tutorial.info/html5-range.php

and not with the "old" approach of doing a slider with any of the myriad
of JS slider libs. Dump that.

Just do a "sess.publish()" of the value in the "onchange()" handler of
the slider ..

>
> Also it would be lovely to do a google plus hangout sometime so you

Well, we could do that, though I'm not sure it'd be of significant value
to you. Do you have some working knowledge in Python and Twisted?
I can't intro to those (obviously .. that takes time), and without, any
"explanations" by me would probably have limited value. On the other
hand, if you have background in above, then yes. But it's only 170 lines
anyway .. half of which is boilerplate arg parsing and such.

> could walk me through the python code. I'm teaching it to my high school
> students, but am really quite new to it.

Ah, ok. It would be helpful to know for me where you want to go with
your teaching. Like, the demo we now have already involves a couple of
parts:

1. the hardware side (ultimately the energy monitor stuff)
2. the C code (sketch) on the Arduino MCU
3. the AutobahnPython/Twisted/Python bridge running on Yun Linux
4. the JS/HTML5 running in browser (which involves AutobahnJS)

Am I right that you're definitely covering 1. + 2. in your teaching (and
you can assume sufficient knowledge/effort in that with your students)?

I am unsure about 4., and even more about 3. ..

Do you want to go into JavaScript, HTML5 etc?

Do you want to go into Python .. and Twisted asynchronous network
programming etc etc

Especially 4. might be a challenge. You know, it's not rocket science,
but you need _some_ background, otherwise it'll be mostly cryptic.

In essence, to master the programming for the demo as of now, you need
to have knowledge in C, Python and JavaScript.

Regarding the way forward: the goal with SRDP/Crossbar.io would be to
get rid of any custom programming (based on raw Autobahn) for 3.

"Just" install Crossbar.io on Yun Linux, and then you can concentrate to
1/2 (and 4).

Does above make any sense?

What's your plan for your teachings? Where would you take that ideally?

Cheers,
/Tobias


>
> Cheers,
> Pete
>
>
> On Sat, Nov 30, 2013 at 11:12 PM, Peter Kalajian <aln...@gwi.net
> <mailto:aln...@gwi.net>> wrote:
>
> Tobias,
>
> It works! Fantastic.
>
> one change: You give the ip address for your yun. Need to remind
> folks to put their ip or just my_arduino_name.local:8080.
>
> what does commenting out the inittab line do?
>
> What next?
>
> Pete
>
>
> On Sat, Nov 30, 2013 at 3:23 PM, Tobias Oberstein
> <tobias.o...@gmail.com <mailto:tobias.o...@gmail.com>> wrote:
>
> OK, all done. Waiting for the next instructions.
>
>
> Hi Peter,
>
> alright, the real-time charting demo ("serial2ws") now runs on
> the Yun.
>
> Added a video to the beginning of
>
> http://tavendo.com/blog/post/__arduino-yun-with-autobahn/
> <http://tavendo.com/blog/post/arduino-yun-with-autobahn/>
>
> and a section "Running the Demo" at the end. It has all the
> steps, though isn't very elaborate, polished or nice .. but
> should be enough so you can do some experiments on your Yun also.
>
> The hard questions are now all answered;) It works.
>
> Now, we can go on with SRDP / Crossbar.io ..
>
> Cheers,
>
> /Tobias
>
>
> --
> 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/B3L4N2J7Jac/__unsubscribe
> <https://groups.google.com/d/topic/autobahnws/B3L4N2J7Jac/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email
> to autobahnws+unsubscribe@__googlegroups.com
> <mailto:autobahnws%2Bunsu...@googlegroups.com>.
> For more options, visit
> https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
>
> --
> 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.

Peter Kalajian

unread,
Dec 1, 2013, 9:15:16 AM12/1/13
to autob...@googlegroups.com
Tobias,

It is a really nicely written blog. Shall I start promoting it?

Pete
--
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/B3L4N2J7Jac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autobahnws+...@googlegroups.com.

Peter Kalajian

unread,
Dec 1, 2013, 9:33:52 AM12/1/13
to autob...@googlegroups.com
Tobias,

Ah, ok with the html 5 implementation of the slider. I'll try that.

Ah, ok. It would be helpful to know for me where you want to go with your teaching. Like, the demo we now have already involves a couple of parts:

1. the hardware side (ultimately the energy monitor stuff)
2. the C code (sketch) on the Arduino MCU
3. the AutobahnPython/Twisted/Python bridge running on Yun Linux
4. the JS/HTML5 running in browser (which involves AutobahnJS)

Am I right that you're definitely covering 1. + 2. in your teaching (and you can assume sufficient knowledge/effort in that with your students)?

Right. at this moment, they are about half the way through the codeacademy.com python course, which I have finished. I'm also used to coding from way back in the 1970's when I used punch cards! So the students will have a basic understanding of python. After they finish the python, we'll play around with the arduino until they have a basic handle on the hardware and the software.  


I am unsure about 4., and even more about 3. ..

Do you want to go into JavaScript, HTML5 etc?

Do you want to go into Python .. and Twisted asynchronous network programming etc etc

Especially 4. might be a challenge. You know, it's not rocket science, but you need _some_ background, otherwise it'll be mostly cryptic.

I agree that they won't be able to follow on too much with the details of the actual code, but they can get a sense of what we are doing, and perhaps be able to modify the code to check more than two pins, etc.  I might be able to get most of it. I can ask you specific questions about the python code.


In essence, to master the programming for the demo as of now, you need to have knowledge in C, Python and JavaScript.

Regarding the way forward: the goal with SRDP/Crossbar.io would be to get rid of any custom programming (based on raw Autobahn) for 3.

"Just" install Crossbar.io on Yun Linux, and then you can concentrate to 1/2 (and 4).

Well, the Crossbar.io implementation sounds too good to be true! That would rocket us forward into the 21st century, no?

Pete 





For more options, visit https://groups.google.com/groups/opt_out.
--
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/B3L4N2J7Jac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autobahnws+unsubscribe@googlegroups.com.

Tobias Oberstein

unread,
Dec 1, 2013, 10:32:11 AM12/1/13
to autob...@googlegroups.com
Am 01.12.2013 15:15, schrieb Peter Kalajian:
> Tobias,
>
> It is a really nicely written blog. Shall I start promoting it?

Yes, please;)

Tobias Oberstein

unread,
Dec 1, 2013, 10:47:34 AM12/1/13
to autob...@googlegroups.com
Hi Pete,
> 1. the hardware side (ultimately the energy monitor stuff)
> 2. the C code (sketch) on the Arduino MCU
> 3. the AutobahnPython/Twisted/Python bridge running on Yun Linux
> 4. the JS/HTML5 running in browser (which involves AutobahnJS)
>
> Am I right that you're definitely covering 1. + 2. in your teaching
> (and you can assume sufficient knowledge/effort in that with your
> students)?
>
>
> Right. at this moment, they are about half the way through the
> codeacademy.com <http://codeacademy.com> python course, which I have
> finished. I'm also used to coding from way back in the 1970's when I
> used punch cards! So the students will have a basic understanding of
> python. After they finish the python, we'll play around with the arduino
> until they have a basic handle on the hardware and the software.

Python .. Codeacademy .. sounds like a good start!

Since you mention "punch cards" .. I've never did anything like that -
me, I started like age 12 on a 8 bit MCU (CDP1802) with machine code /
assembly - it was a hard, but good experience;) Moved on to Apple II
(Motorola 6502), Commodore C64, Amiga etc

Besides C vs JavaScript vs Python on a _language_ level, there is 1
major difference:

The MCU programming on the Arduino in C is in a _synchronous_ style:
like do A, then B, then wait N ms, then loop again.

Both the networking programming with Autobahn/Twisted in Python and the
UI/network programming in JavaScript in the browser follow a
fundamentally different style: _asynchronous_ event driven programming.

That is, I hook up an event handler (a piece of code), that will get
fired _by the framework_ when something specific happens. A button is
clicked. A message arrives from the network. Etc.

This difference in style I'd say is larger and probably more fundamental
than any difference between Python and JavaScript (and probably even to
C .. where there are asynch. frameworks also).

An introduction to asynchronous (network and/or UI) programming is
probably a course in itself. It's a whole world on it's own. Just wanted
to say ..

But I agree: some "basic" understanding, and tinkering around with
modifying sample code is possible nevertheless ..

>
>
>
> I am unsure about 4., and even more about 3. ..
>
> Do you want to go into JavaScript, HTML5 etc?
>
> Do you want to go into Python .. and Twisted asynchronous network
> programming etc etc
>
> Especially 4. might be a challenge. You know, it's not rocket
> science, but you need _some_ background, otherwise it'll be mostly
> cryptic.
>
>
> I agree that they won't be able to follow on too much with the details
> of the actual code, but they can get a sense of what we are doing, and
> perhaps be able to modify the code to check more than two pins, etc. I
> might be able to get most of it. I can ask you specific questions about
> the python code.
>
>
>
> In essence, to master the programming for the demo as of now, you
> need to have knowledge in C, Python and JavaScript.
>
> Regarding the way forward: the goal with SRDP/Crossbar.io would be
> to get rid of any custom programming (based on raw Autobahn) for 3.
>
> "Just" install Crossbar.io on Yun Linux, and then you can
> concentrate to 1/2 (and 4).
>
>
> Well, the Crossbar.io implementation sounds too good to be true! That

If only a day had 48h .. or we had more development man power .. since:
it's clear how to do it, we have all the basic blocks already, but yes,
it's still a lot of detail work ..

> would rocket us forward into the 21st century, no?

Yes, I agree (obviously) =)

/Tobias

>
> Pete
>
>
>
>
> On Sun, Dec 1, 2013 at 9:05 AM, Tobias Oberstein
> <tobias.o...@gmail.com <mailto:tobias.o...@gmail.com>> wrote:
>
> Am 01.12.2013 05:45, schrieb Peter Kalajian:
>
> Tobias,
>
> How about adding a slider like
> http://www.dyn-web.com/code/__slider/
> <http://www.dyn-web.com/code/slider/> to
> send data to analogwrite to a digital pin for PWM? That would be
> a good
> feature for the robotics types to control motors.
>
>
> Yes, this can be done trivially. I'd recommend to go with the new
> HTML5 slider element:
>
> <input type="range">
>
> http://www.html5tutorial.info/__html5-range.php
> <mailto:aln...@gwi.net <mailto:aln...@gwi.net>>> wrote:
>
> Tobias,
>
> It works! Fantastic.
>
> one change: You give the ip address for your yun. Need to
> remind
> folks to put their ip or just my_arduino_name.local:8080.
>
> what does commenting out the inittab line do?
>
> What next?
>
> Pete
>
>
> On Sat, Nov 30, 2013 at 3:23 PM, Tobias Oberstein
> <tobias.o...@gmail.com
> <mailto:tobias.o...@gmail.com>
> <mailto:tobias.oberstein@__gmail.com
> <mailto:tobias.o...@gmail.com>>> wrote:
>
> OK, all done. Waiting for the next instructions.
>
>
> Hi Peter,
>
> alright, the real-time charting demo ("serial2ws") now
> runs on
> the Yun.
>
> Added a video to the beginning of
>
> http://tavendo.com/blog/post/____arduino-yun-with-autobahn/
> <http://tavendo.com/blog/post/__arduino-yun-with-autobahn/>
>
>
> <http://tavendo.com/blog/post/__arduino-yun-with-autobahn/
> <http://tavendo.com/blog/post/arduino-yun-with-autobahn/>>
>
> and a section "Running the Demo" at the end. It has all the
> steps, though isn't very elaborate, polished or nice .. but
> should be enough so you can do some experiments on your
> Yun also.
>
> The hard questions are now all answered;) It works.
>
> Now, we can go on with SRDP / Crossbar.io ..
>
> Cheers,
>
> /Tobias
>
>
> --
> 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/B3L4N2J7Jac/____unsubscribe
> <https://groups.google.com/d/__topic/autobahnws/B3L4N2J7Jac/__unsubscribe>
> to autobahnws+unsubscribe@__googl__egroups.com
> <http://googlegroups.com>
> <mailto:autobahnws%__2Buns...@googlegroups.com
> <mailto:autobahnws%252Buns...@googlegroups.com>__>.
> For more options, visit
> https://groups.google.com/____groups/opt_out
> <https://groups.google.com/__groups/opt_out>
> <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>.
>
>
>
> --
> 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+unsubscribe@__googlegroups.com
> <mailto:autobahnws%2Bunsu...@googlegroups.com>.
> For more options, visit
> https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
> --
> 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/B3L4N2J7Jac/__unsubscribe
> <https://groups.google.com/d/topic/autobahnws/B3L4N2J7Jac/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> autobahnws+unsubscribe@__googlegroups.com
> <mailto:autobahnws%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
> --
> 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.

Peter Kalajian

unread,
Dec 1, 2013, 2:40:48 PM12/1/13
to autob...@googlegroups.com
Tobias,

OK, I posted a link to the blog on my blog and the arduino yun forum. Let's see how much traffic we get. 

I understand the difference between event-driven and synchronous, but all my early training happened just before event driven stuff started happening and my tiny brain is still struggling to catch up. I'm reading through your blog on websockets and reading some of the specs, too, so give a few days, I'll be up to speed. 

A specific question on the serial2ws.py code:

class Serial2WsOptions(usage.Options):
   
   optFlags = [
      ['debugserial', 'd', 'Turn on Serial data logging.'],
      ['debugwamp', 't', 'Turn on WAMP traffic logging.'],
      ['debugws', 'r', 'Turn on WebSocket traffic logging.']
   ]
   optParameters = [
      ['baudrate', 'b', 9600, 'Serial baudrate'],
      ['port', 'p', '/dev/ttyATH0', 'Serial port to use (e.g. 3 for a COM port on Windows, /dev/ttyATH0 for Arduino Yun, /dev/ttyACM0 for Serial-over-USB on RaspberryPi'],
      ['webport', 'w', 8080, 'Web port to use for embedded Web server'],
      ['wsurl', 's', "ws://localhost:9000", 'WebSocket port to use for embedded WebSocket server']
   ]
 I understand that this is just two lists of lists in a class. My question is when you make an instance of the class here:

   o = Serial2WsOptions()
   try:
      o.parseOptions()
   except usage.UsageError, errortext:
      print '%s %s' % (sys.argv[0], errortext)
      print 'Try %s --help for usage details' % sys.argv[0]
      sys.exit(1)

   debugWs = bool(o.opts['debugws'])
   debugWamp = bool(o.opts['debugwamp'])
   debugSerial = bool(o.opts['debugserial'])
   baudrate = int(o.opts['baudrate'])
   port = o.opts['port']
   webport = int(o.opts['webport'])
   wsurl = o.opts['wsurl']

where does the parseOptions method come from? Also, where does the .opts method come from?



        <mailto:tobias.oberstein@gmail.com>
        <mailto:tobias.oberstein@__gmail.com
                 <mailto:autobahnws%__2Bunsu...@googlegroups.com
        <mailto:autobahnws%252Bunsubscribe@googlegroups.com>__>.

For more options, visit https://groups.google.com/groups/opt_out.
--
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/B3L4N2J7Jac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autobahnws+unsubscribe@googlegroups.com.

Peter Kalajian

unread,
Dec 1, 2013, 2:50:11 PM12/1/13
to autob...@googlegroups.com
Tobias,

So I am working on setting up the slider. At this point, the arduino code looks at the serial stream only for 1's and 0's. I guess I need to make some sort of message header to discern between button pushes and slider values. Say the button stream is now "B0" and "B1" and the slider message is something like "S102" where the 102 is the value to pass to the analogWrite to an LED pin to set the brightness. Am I correct that this is the way to go forward?

Pete

Tobias Oberstein

unread,
Dec 1, 2013, 4:08:55 PM12/1/13
to autob...@googlegroups.com
Am 01.12.2013 20:40, schrieb Peter Kalajian:
> Tobias,
>
> OK, I posted a link to the blog on my blog and the arduino yun forum.
> Let's see how much traffic we get.

Awesome, thanks!

>
> I understand the difference between event-driven and synchronous, but
> all my early training happened just before event driven stuff started
> happening and my tiny brain is still struggling to catch up. I'm reading
> through your blog on websockets and reading some of the specs, too, so
> give a few days, I'll be up to speed.

Alright;)

>
> A specific question on the serial2ws.py code:
>
> class Serial2WsOptions(usage.Options):
>
> optFlags = [
> ['debugserial', 'd', 'Turn on Serial data logging.'],
> ['debugwamp', 't', 'Turn on WAMP traffic logging.'],
> ['debugws', 'r', 'Turn on WebSocket traffic logging.']
> ]
> optParameters = [
> ['baudrate', 'b', 9600, 'Serial baudrate'],
> ['port', 'p', '/dev/ttyATH0', 'Serial port to use (e.g. 3 for
> a COM port on Windows, /dev/ttyATH0 for Arduino Yun, /dev/ttyACM0
> for Serial-over-USB on RaspberryPi'],
> ['webport', 'w', 8080, 'Web port to use for embedded Web
> server'],
> ['wsurl', 's', "ws://localhost:9000", 'WebSocket port to use
> for embedded WebSocket server']
> ]
>
> I understand that this is just two lists of lists in a class. My

Yes. And the attribute names (optFlags, optParameters) need to be like
this, since that is what the base class usage.Options expects.


> question is when you make an instance of the class here:
>
>
> o = Serial2WsOptions()
>
..
> where does the parseOptions method come from? Also, where does the .opts
> method come from?

That method comes from the base class of Serial2WsOptions which is
usage.Options

One more note: usage.Options is a Twisted utility class for command line
parsing - and that was my preferred way of parsing cmd lines until
recently, since Python always had stuff for this too, but not as nice as
the usage.Options.

But: now there is argparse module in Python standard library:

http://docs.python.org/dev/library/argparse.html

If you want to learn the new shiny, go with argparse. I use it for all
"new" code, like here:

https://github.com/tavendo/AutobahnPython/blob/master/examples/websocket/echo_multicore/server.py#L352
https://github.com/tavendo/SRDP/blob/master/python/srdp/srdp/srdptoolrunner.py#L61
https://github.com/crossbario/crossbar/blob/master/crossbar/crossbar/cli.py#L737
> <mailto:tobias.o...@gmail.com>>> wrote:
>
> Am 01.12.2013 05:45, schrieb Peter Kalajian:
>
> Tobias,
>
> How about adding a slider like
> http://www.dyn-web.com/code/____slider/
> <http://www.dyn-web.com/code/__slider/>
>
> <http://www.dyn-web.com/code/__slider/
> <http://www.dyn-web.com/code/slider/>> to
> send data to analogwrite to a digital pin for PWM? That
> would be
> a good
> feature for the robotics types to control motors.
>
>
> Yes, this can be done trivially. I'd recommend to go with
> the new
> HTML5 slider element:
>
> <input type="range">
>
> http://www.html5tutorial.info/____html5-range.php
> <http://www.html5tutorial.info/__html5-range.php>
> <mailto:tobias.oberstein@
> <mailto:tobias.oberstein@>__gma__il.com <http://gmail.com>
>
> <mailto:tobias.oberstein@__gmail.com
> <mailto:tobias.o...@gmail.com>>>> wrote:
>
> OK, all done. Waiting for the next
> instructions.
>
>
> Hi Peter,
>
> alright, the real-time charting demo
> ("serial2ws") now
> runs on
> the Yun.
>
> Added a video to the beginning of
>
> http://tavendo.com/blog/post/______arduino-yun-with-autobahn/
> <http://tavendo.com/blog/post/____arduino-yun-with-autobahn/>
>
> <http://tavendo.com/blog/post/____arduino-yun-with-autobahn/
> <http://tavendo.com/blog/post/__arduino-yun-with-autobahn/>>
>
>
>
>
> <http://tavendo.com/blog/post/____arduino-yun-with-autobahn/
> <http://tavendo.com/blog/post/__arduino-yun-with-autobahn/>
>
> <http://tavendo.com/blog/post/__arduino-yun-with-autobahn/
> <http://tavendo.com/blog/post/arduino-yun-with-autobahn/>>>
>
> and a section "Running the Demo" at the end.
> It has all the
> steps, though isn't very elaborate, polished
> or nice .. but
> should be enough so you can do some
> experiments on your
> Yun also.
>
> The hard questions are now all answered;) It
> works.
>
> Now, we can go on with SRDP / Crossbar.io ..
>
> Cheers,
>
> /Tobias
>
>
> --
> 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/__B3L4N2J7Jac/____unsubscribe
> <https://groups.google.com/d/____topic/autobahnws/B3L4N2J7Jac/____unsubscribe>
> autobahnws+unsubscribe@__googl____egroups.com
> <http://googl__egroups.com>
> <http://googlegroups.com>
>
> <mailto:autobahnws%____2Bun...@googlegroups.com
> <mailto:autobahnws%25__2Bun...@googlegroups.com>
> <mailto:autobahnws%__252Bunsubscribe@googlegroups.__com
> <mailto:autobahnws%25252Bun...@googlegroups.com>>__>.
> For more options, visit
> https://groups.google.com/______groups/opt_out
> <https://groups.google.com/____groups/opt_out>
> <https://groups.google.com/____groups/opt_out
> <https://groups.google.com/__groups/opt_out>>
>
> <https://groups.google.com/____groups/opt_out
> <https://groups.google.com/__groups/opt_out>
> <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>>.
>
>
>
> --
> 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+unsubscribe@__googl__egroups.com
> <http://googlegroups.com>
>
> <mailto:autobahnws%__2Buns...@googlegroups.com
> <mailto:autobahnws%252Buns...@googlegroups.com>__>.
> You received this message because you are subscribed to a
> <mailto:autobahnws%__2Buns...@googlegroups.com
> <mailto:autobahnws%252Buns...@googlegroups.com>__>.
> an email to autobahnws+...@googlegroups.com.

Tobias Oberstein

unread,
Dec 1, 2013, 4:15:11 PM12/1/13
to autob...@googlegroups.com
Hi Pete,

> So I am working on setting up the slider. At this point, the arduino
> code looks at the serial stream only for 1's and 0's. I guess I need to
> make some sort of message header to discern between button pushes and
> slider values. Say the button stream is now "B0" and "B1" and the slider

Exactly.

> message is something like "S102" where the 102 is the value to pass to
> the analogWrite to an LED pin to set the brightness. Am I correct that
> this is the way to go forward?

Yes. Of course there are many, many ways to do that.

You can go with some ASCII based thing .. which is easy to print to
debug log etc, but you need to "parse" a little in C on MCU.

Or you can just do a 2 byte "protocol": Byte 1 == target (like LED or
PWM) and Byte 2 == value.

https://github.com/tavendo/AutobahnPython/blob/master/examples/wamp/serial2ws/serial2ws.ino#L72

The other main design question is if you want to have "pins" addressed
in your proto, or address "logical" things like LED-1 and Servo-2.

And this need for inventing an "adhoc" protocol on serial each time you
want to do more or something was the original motiviation for SRDP.

But I guess it's good to tinker with some adhoc hacks anyway .. if only
for the "learning" experience ..

/Tobias

>
> Pete
> <mailto:tobias.o...@gmail.com>
> <mailto:tobias.oberstein@__gmail.com
> <mailto:tobias.o...@gmail.com>>> wrote:
>
> Am 01.12.2013 05:45, schrieb Peter Kalajian:
>
> Tobias,
>
> How about adding a slider like
> http://www.dyn-web.com/code/____slider/
> <http://www.dyn-web.com/code/__slider/>
>
> <http://www.dyn-web.com/code/__slider/
> <http://www.dyn-web.com/code/slider/>> to
> send data to analogwrite to a digital pin for PWM?
> That would be
> a good
> feature for the robotics types to control motors.
>
>
> Yes, this can be done trivially. I'd recommend to go
> with the new
> HTML5 slider element:
>
> <input type="range">
>
> http://www.html5tutorial.info/____html5-range.php
> <http://www.html5tutorial.info/__html5-range.php>
> <mailto:tobias.o...@gmail.com>>>> wrote:
>
> OK, all done. Waiting for the next
> instructions.
>
>
> Hi Peter,
>
> alright, the real-time charting demo
> ("serial2ws") now
> runs on
> the Yun.
>
> Added a video to the beginning of
>
> http://tavendo.com/blog/post/______arduino-yun-with-autobahn/ <http://tavendo.com/blog/post/____arduino-yun-with-autobahn/>
>
> <http://tavendo.com/blog/post/____arduino-yun-with-autobahn/
> <http://tavendo.com/blog/post/__arduino-yun-with-autobahn/>>
>
>
>
>
> <http://tavendo.com/blog/post/____arduino-yun-with-autobahn/
> <http://tavendo.com/blog/post/__arduino-yun-with-autobahn/>
>
> <http://tavendo.com/blog/post/__arduino-yun-with-autobahn/
> <http://tavendo.com/blog/post/arduino-yun-with-autobahn/>>>
>
> and a section "Running the Demo" at the
> end. It has all the
> steps, though isn't very elaborate,
> polished or nice .. but
> should be enough so you can do some
> experiments on your
> Yun also.
>
> The hard questions are now all answered;)
> It works.
>
> Now, we can go on with SRDP / Crossbar.io ..
>
> Cheers,
>
> /Tobias
>
>
> --
> 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/__B3L4N2J7Jac/____unsubscribe
> <https://groups.google.com/d/____topic/autobahnws/B3L4N2J7Jac/____unsubscribe>
> <mailto:autobahnws%25252Bun...@googlegroups.com>>__>.
> For more options, visit
> https://groups.google.com/______groups/opt_out
> <https://groups.google.com/____groups/opt_out>
> <https://groups.google.com/____groups/opt_out
> <https://groups.google.com/__groups/opt_out>>
>
>
> <https://groups.google.com/____groups/opt_out
> <https://groups.google.com/__groups/opt_out>
> <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>>.
>
>
>
> --
> 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
> <mailto:autobahnws%252Buns...@googlegroups.com>__>.
> For more options, visit
> https://groups.google.com/____groups/opt_out
> <https://groups.google.com/__groups/opt_out>
> <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>.
>
>
> --
> You received this message because you are subscribed to
> <mailto:autobahnws%__2Buns...@googlegroups.com
> <mailto:autobahnws%252Buns...@googlegroups.com>__>.
> an email to autobahnws+...@googlegroups.com.

Peter Kalajian

unread,
Dec 2, 2013, 9:03:31 PM12/2/13
to autob...@googlegroups.com
Tobias,

OK, Now I remember that the argument in a class definition is the parent. That makes sense. I'll look into the argparse. 

So as far as the target - value strategy, couldn't I send a string to the mcu with an ID then a Value separated by a space just like we receive from the mcu? On the mcu side, then instead of putting values into a byte variable, I could put them into a string variable and parse them into id and value and then turn the values into integers to analogWrite them. 

        <mailto:tobias.oberstein@__gmail.com
        <mailto:tobias.oberstein@gmail.com>>> wrote:

        <mailto:tobias.oberstein@gmail.com>
                 <mailto:tobias.oberstein@__gmail.com
        <mailto:tobias.oberstein@gmail.com>>
                 <mailto:tobias.oberstein@
        <mailto:tobias.oberstein@>__gma__il.com <http://gmail.com>


                 <mailto:tobias.oberstein@__gmail.com
          <mailto:autobahnws%____2Bunsu...@googlegroups.com
        <mailto:autobahnws%25__2Bunsu...@googlegroups.com>
                 <mailto:autobahnws%__252Bunsubscribe@googlegroups.__com
        <mailto:autobahnws%25252Bunsubscribe@googlegroups.com>>__>.

                          For more options, visit
        https://groups.google.com/______groups/opt_out
        <https://groups.google.com/____groups/opt_out>

                 <https://groups.google.com/____groups/opt_out
        <https://groups.google.com/__groups/opt_out>>

                          <https://groups.google.com/____groups/opt_out
        <https://groups.google.com/__groups/opt_out>
                 <https://groups.google.com/__groups/opt_out
        <https://groups.google.com/groups/opt_out>>>.



                 --
                 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+unsubscribe@__googl__egroups.com

        <http://googlegroups.com>

                 <mailto:autobahnws%__2Bunsu...@googlegroups.com
        <mailto:autobahnws%252Bunsubscribe@googlegroups.com>__>.

                 For more options, visit
        https://groups.google.com/____groups/opt_out
        <https://groups.google.com/__groups/opt_out>
                 <https://groups.google.com/__groups/opt_out
        <https://groups.google.com/groups/opt_out>>.


             --
             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/B3L4N2J7Jac/____unsubscribe
        <https://groups.google.com/d/__topic/autobahnws/B3L4N2J7Jac/__unsubscribe>

        <https://groups.google.com/d/__topic/autobahnws/B3L4N2J7Jac/__unsubscribe
        <https://groups.google.com/d/topic/autobahnws/B3L4N2J7Jac/unsubscribe>>.
             To unsubscribe from this group and all its topics, send an
        email to
             autobahnws+unsubscribe@__googl__egroups.com
        <http://googlegroups.com>
             <mailto:autobahnws%__2Bunsu...@googlegroups.com
        <mailto:autobahnws%252Bunsubscribe@googlegroups.com>__>.

For more options, visit https://groups.google.com/groups/opt_out.
--
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/B3L4N2J7Jac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autobahnws+unsubscribe@googlegroups.com.

Tobias Oberstein

unread,
Dec 3, 2013, 3:52:36 AM12/3/13
to autob...@googlegroups.com
Hi Pete,

> So as far as the target - value strategy, couldn't I send a string to
> the mcu with an ID then a Value separated by a space just like we
> receive from the mcu? On the mcu side, then instead of putting values
> into a byte variable, I could put them into a string variable and parse
> them into id and value and then turn the values into integers to
> analogWrite them.

Of course. It doesn't matter. It's just that string parsing and handling
in C is slightly uncomfortable .. maybe I am just spoiled by the
convenience that Python brings in this respect;)

/Tobias

Peter Kalajian

unread,
Dec 4, 2013, 6:52:48 PM12/4/13
to autob...@googlegroups.com
Tobias,

Here's a script I use to write a key value pair to the arduino using the tcp library. I am using the OSC protocol here to get a fader value from my iphone and control the brightness of an LED. Couldn't we use this tcp protocol with the websocket for communications back and forth from the mcu to the cpu? That way we could format all our commands in python. Of course that uses the bridge.h library on the mcu side, so I suppose we have to uncomment the inittab? I ask because it seems a lot easier to write (as you say) the parsing on the cpu side.

Pete




/Tobias

--
You received this message because you are subscribed to a topic in the Google Groups "Autobahn" group.

Peter Kalajian

unread,
Dec 4, 2013, 7:01:28 PM12/4/13
to autob...@googlegroups.com
OHHHH, I just started reading the SRDP code. I get what you are trying to do. This is very cool. What's left to be done and how can I help? I'm not a great programmer, mind you , but I can do tests and modify with some direction. 

Pete

Tobias Oberstein

unread,
Dec 5, 2013, 5:37:22 AM12/5/13
to autob...@googlegroups.com
Am 05.12.2013 00:52, schrieb Peter Kalajian:
> Tobias,
>
> Here's a script I use to write a key value pair to the arduino using the
> tcp library. I am using the OSC protocol here to get a fader value from
> my iphone and control the brightness of an LED. Couldn't we use this tcp
> protocol with the websocket for communications back and forth from the
> mcu to the cpu? That way we could format all our commands in python. Of
> course that uses the bridge.h library on the mcu side, so I suppose we
> have to uncomment the inittab? I ask because it seems a lot easier to
> write (as you say) the parsing on the cpu side.

The way forward in my view is SRDP, since that will allow us to do away
with any custom forwarding code on the CPU ..

/Tobias

>
> Pete
>
>
> On Tue, Dec 3, 2013 at 3:52 AM, Tobias Oberstein
> <tobias.o...@gmail.com <mailto:tobias.o...@gmail.com>> wrote:
>
> Hi Pete,
>
>
> So as far as the target - value strategy, couldn't I send a
> string to
> the mcu with an ID then a Value separated by a space just like we
> receive from the mcu? On the mcu side, then instead of putting
> values
> into a byte variable, I could put them into a string variable
> and parse
> them into id and value and then turn the values into integers to
> analogWrite them.
>
>
> Of course. It doesn't matter. It's just that string parsing and
> handling in C is slightly uncomfortable .. maybe I am just spoiled
> by the convenience that Python brings in this respect;)
>
>
> /Tobias
>
> --
> 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/B3L4N2J7Jac/__unsubscribe
> <https://groups.google.com/d/topic/autobahnws/B3L4N2J7Jac/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> autobahnws+unsubscribe@__googlegroups.com
> <mailto:autobahnws%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
> --
> 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.

Tobias Oberstein

unread,
Dec 5, 2013, 5:49:05 AM12/5/13
to autob...@googlegroups.com
Hi Pete,

Am 05.12.2013 01:01, schrieb Peter Kalajian:
> OHHHH, I just started reading the SRDP code. I get what you are trying
> to do. This is very cool. What's left to be done and how can I help? I'm

Feedback on SRDP would be very helpful .. eg does the following make any
sense to you (is it easy enough?):

https://github.com/tavendo/SRDP/blob/master/arduino/demoboard/DemoBoard/DemoBoard.ino

This is how code would look like for sketch that wires up some custom
Arduino hardware to SRDP. Doing that, you won't have to do any coding on
the CPU side anymore.

Regarding the energy monitor, does the following make sense to you?

https://github.com/tavendo/SRDP/blob/master/python/srdp/srdp/eds/devices/energymonitor.json

> not a great programmer, mind you , but I can do tests and modify with
> some direction.

SRDP needs to be integrated into Crossbar.io and WAMP symmetric RPCs
need to get RPC routing. It's pretty involved, but you can definitely
help with testing stuff. I need to see how I can find time to get this
all done .. I send an update later or tomorrow.

/Tobias
> https://groups.google.com/d/__topic/autobahnws/B3L4N2J7Jac/__unsubscribe
> <https://groups.google.com/d/topic/autobahnws/B3L4N2J7Jac/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email
> to autobahnws+unsubscribe@__googlegroups.com
> <mailto:autobahnws%2Bunsu...@googlegroups.com>.
> For more options, visit
> https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
>
> --
> 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.

Peter Kalajian

unread,
Dec 9, 2013, 9:19:52 PM12/9/13
to autob...@googlegroups.com
Tobias, 

Got the energy monitor board today and soldered it up. Looks good.
 
Feedback on SRDP would be very helpful .. eg does the following make any sense to you (is it easy enough?):

https://github.com/tavendo/SRDP/blob/master/arduino/demoboard/DemoBoard/DemoBoard.ino

This is how code would look like for sketch that wires up some custom Arduino hardware to SRDP. Doing that, you won't have to do any coding on the CPU side anymore.

Ok I looked at it. I understand some of it. I get that you are setting up custom registers to read and write from, but you'd have to go through it in some detail with me before I understood it completely.

 Regarding the energy monitor, does the following make sense to you?

https://github.com/tavendo/SRDP/blob/master/python/srdp/srdp/eds/devices/energymonitor.json

Yes, this does make sense. You are setting up specific registers with certain data. For units, Vrms is in volts, Irms is in amps, power factor is unitless, real and apparent power are in watts. Probably the calibrations are unitless, but I will go back and look at the Enmon stuff to confirm.

Cheers,

Pete




For more options, visit https://groups.google.com/groups/opt_out.
--
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/B3L4N2J7Jac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autobahnws+unsubscribe@googlegroups.com.

Tobias Oberstein

unread,
Dec 12, 2013, 2:02:02 PM12/12/13
to autob...@googlegroups.com, aln...@gwi.net
Hi Pete,

I nearly missed your reply .. somehow Gmail sometimes cheats on me. I've been doing a lot of work on WAMPv2 and symmetric RPC lately .. which is how we can integrate SRDP then. Not yet finished, but it's getting somewhere. Rgd. the Arduino SRDP demo below: yes, custom registers, and "glue" code for wiring up those. I write more on it ..

/Tobias
    <tobias.o...@gmail.com <mailto:tobias.o...@gmail.com>> wrote:

        Hi Pete,


            So as far as the target - value strategy, couldn't I send a
            string to
            the mcu with an ID then a Value separated by a space just
            like we
            receive from the mcu? On the mcu side, then instead of
            putting values
            into a byte variable, I could put them into a string
            variable and parse
            them into id and value and then turn the values into integers to
            analogWrite them.


        Of course. It doesn't matter. It's just that string parsing and
        handling in C is slightly uncomfortable .. maybe I am just
        spoiled by the convenience that Python brings in this respect;)


        /Tobias

        --
        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/B3L4N2J7Jac/__unsubscribe
        <https://groups.google.com/d/topic/autobahnws/B3L4N2J7Jac/unsubscribe>.

        To unsubscribe from this group and all its topics, send an email
        to autobahnws+unsubscribe@__googlegroups.com

        For more options, visit
        https://groups.google.com/__groups/opt_out
        <https://groups.google.com/groups/opt_out>.



--
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

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

--
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/B3L4N2J7Jac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autobahnws+...@googlegroups.com.

Daniel Tedenljung

unread,
Jan 5, 2014, 5:50:19 AM1/5/14
to autob...@googlegroups.com
Hello!

I have found this blogpost, but this part is broken:

The full demo code resides under examples/wamp/serial2ws in the AutobahnPython Git repository here.

The link is 404 and if I browse github I do not fint the file.

Please help me sort this out, I really would like to test this out!.

Best Regards
Daniel Tedenljung

Tobias Oberstein

unread,
Jan 5, 2014, 5:53:30 AM1/5/14
to autob...@googlegroups.com
Am 05.01.2014 11:50, schrieb Daniel Tedenljung:
> Hello!
>
> I have found this blogpost, but this part is broken:
>
> The full demo code resides under |examples/wamp/serial2ws| in the
> AutobahnPython Git repository here
> <https://github.com/tavendo/AutobahnPython/tree/master/examples/wamp/serial2ws>.
>
> The link is 404 and if I browse github I do not fint the file.
>
> Please help me sort this out, I really would like to test this out!.

Yeah, sorry. Things have been refactored recently:

https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/serial2ws

https://github.com/tavendo/AutobahnPython#upgrading-from-autobahn--070

Hope it still works;)

/Tobias

>
> Best Regards
> Daniel Tedenljung
>
>
>
> Den s�ndagen den 1:e december 2013 kl. 16:32:11 UTC+1 skrev Tobias
> Oberstein:
>
> Am 01.12.2013 15:15, schrieb Peter Kalajian:
> > Tobias,
> >
> > It is a really nicely written blog. Shall I start promoting it?
>
> Yes, please;)
>
> --
> 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

Daniel Tedenljung

unread,
Jan 5, 2014, 6:01:08 AM1/5/14
to autob...@googlegroups.com
Thanks for helping!

Do you update the links on the blogpost also?

BR
Daniel Tedenljung

Den söndagen den 5:e januari 2014 kl. 11:53:30 UTC+1 skrev Tobias Oberstein:
Am 05.01.2014 11:50, schrieb Daniel Tedenljung:
> Hello!
>
> I have found this blogpost, but this part is broken:
>
> The full demo code resides under |examples/wamp/serial2ws| in the
> AutobahnPython Git repository here
> <https://github.com/tavendo/AutobahnPython/tree/master/examples/wamp/serial2ws>.
>
> The link is 404 and if I browse github I do not fint the file.
>
> Please help me sort this out, I really would like to test this out!.

Yeah, sorry. Things have been refactored recently:

https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/serial2ws

https://github.com/tavendo/AutobahnPython#upgrading-from-autobahn--070

Hope it still works;)

/Tobias

>
> Best Regards
> Daniel Tedenljung
>
>
>
> Den s�ndagen den 1:e december 2013 kl. 16:32:11 UTC+1 skrev Tobias
Reply all
Reply to author
Forward
0 new messages