What is publishPin method ?

Hello,

I want to turn on a LED when analog input from a photoresistor is under a certain value.I ve tried various tutos with addListener and publishPin but nothing happens.

To simplify the exercice I've  tried to print a single message when digital input on pin 22 changes...but nothing again  :-(

Thanks for helping

Alessandruino's picture

Hey kowitz , give a look to

Hey kowitz ,

give a look to the example in this page : http://myrobotlab.org/service/arduino

Let us know

Alessandro

 

kowitz's picture

Perfect !!

Thank you Alessandro, I'ts going well now !

Two more things:

1- Can you tell me why I need to make a manual soft reset and to restart MRL each time I modify the script ?

2- How can I learn about services, classes and  methods ? I mean there is rarely a description of what thing does on rawgit.com

Thanks again

Sylvain

GroG's picture

Use the

Use the NOWORKY! 

http://myrobotlab.org/content/helpful-myrobotlab-tips-and-tricks-0#noWorky

I'm sure we can figure out the problem with it.

kowitz's picture

Ever done

Thank you GroG,

I think I ve ever sent one yesterday... but actually I've solved my pb thanks to Alessandro's answer.

I met a problem with script reloading. I v'e just realized I need to restart MRL and make a manual soft reset on board each time I make a change on script. Is that normal ?

 

Sylvain

 

GroG's picture

Yay ! Glad you figured it

Yay !

Glad you figured it out.

If you have a future problem its best to post info about it like you did here - then you can notify us you sent a noWorky. Our team of crack monkeys will help you quickly after that.

Its great you are looking for more information.  Here are some links which might be useful.
 

  • Service Matrix - list of all Service
  • In each one of these "should" have a description of what it does and a working Python script.  If it doesn't and you are interested in it - let us know and we'll get some info or code for it.  There are many and few of us.. so we can't keep up with documentation all the time.
  • Within each Service page there is a JavaDoc like - javadoc This will get you some more in-depth documentation regarding a service - at least some method names, maybe some descriptions
  • Another place where you can see methods is the gui tab - if you click on an  in or out port of any service you will get a list.

  • Tips and Tricks
  • FAQs
  • Ask Us