Embed code in forum using CodeBender
-
The excellent Codebender project compiles your code server-side and you don't even need the Arduino IDE to upload examples to your attached Arduino sensors.
Thanks to a new forum plugin it's now now much easier to share and test each others code.
Just drop the url to your codebender page in the forum. E.g.
https://codebender.cc/example/01.Basics/Blink
We will later update the main site to use codebender for the examples as well.
-
@hek Awesome^2 !
Btw. curently I'm having troubles running the chrome codebender plugin (and aparently I'm not alone...)
Firefox seems to work fine, however.
-
I was playing a bit with this last night.
I understand they will add the mySensors library directly into codebender, but in the meantime, if you want to use the Mysensors library, then you can add it to your "personal librarys".In this sketch im using the 1.3 mySensors lib so i needed to make a zip of my \libraries\MySensors dir and the RF24 dir and upload this.
Kinda handily, if you clone this sketch, i understand you should also get a copy of these libs added to your personal libraries so the above wont be required.Quite cool to be able to modify sketches from any browser!
https://codebender.cc/sketch:44296
@Hek - i guess there may need to be some changes to the lib names to handle the different versions??
-
@hek And my broswer that is chromium in the ground doesn't get recognized... Sigh
-
-
They have pushed version 1.4 version under the name MySensor. So 1.4 examples should work (if all 3:rd party libraries is present). Need to test some of them later tonight.
Don't think mixed public versions is possible/allowed. But you can always keep a the older version in your local sandbox if I understand it correctly.
-
@hek said:
Don't think mixed public versions is possible/allowed. But you can always keep a the older version in your local sandbox if I understand it correctly
Yeah -that my understanding. The "personal" libs take precedence over public...
What will this mean for RF24 lib? IIRC the version we use has been modified by you?
-
I'm still struggeling with my broswer (opera) trying to get in contact with them on IRC (freenode #codebender.cc (hehe I noticed a mysensors-channel there too now ^^))
Is it possible to have some custom hardware definitions? I have a modded pro mini 16mhz there I run optiboot instead of arduino bootloader (saves 1.5Kb) and yes I could use uno instead but I have changed the fuses to run at 2mhz and no burnout fuse (to be able to run on battery)
-
@Damme
Custom bards - yes! goto codebender.cc/boards and you can upload your own boards files.
I did it just now and posted about it here: http://forum.mysensors.org/topic/251/devduino-v-2-0-board/19As you seem to know a bit about hacking boards.txt's any ideas why the boards.txt entry i used above, spits out garbage on the serial port after being used? the sketch itself seems to run ok as the data is being sent back to Vera, but when using this boards entry the serial output is a mess!
-
@gregl My quick guess without looking at it is that you have wrong .build.f_cpu=
So, the bord runs at 8mhz, but the compiler thinks its 16mhz, you enter 115200, try half (57600)..
I couldnt see your txt so include it so I can look at it, or better up, start a new thread and we'll talk about it there.
-
My ipad doesn't have a "valid" browser. Which means that I can't scroll inside the code box to even read the code
-
It does work well in opera, codebender just dont know its supported, but I made this little video for the peeps on the irc channel
works in win7 x32 and x64 opera 23, 24 and 25. I have not tried windows 8.
http://youtu.be/p_jyIUm2GM4
-
I just tested using the DallasTemperature sketch. It picked up the MySensors libraries that @hek uploaded to codebender a few days ago and compiled successfully!!!
Are all other libraries that are used by MySensors unchanged and up-to-date or would we run into issues with specific changes done in mysensors/Arduino/libraries/... compared to the original libraries that we would find in codebender? If so, uploading the changed versions as private libraries might be an option but I'm not a codebender expert
-
Codebender doesn't seem to be working as it was planned. I have tried a few of the sketches, but when I try to compile them I get around 62 errors. Looks to me like libraries have been edited and then never updated. It is a pity, because this whole site made it look so simple to make your own sensors and stuff, and when Codebender started and I started looking to give this ago, it really did look really easy to play around with these things and give it a go. Now though it just isn't as easy as it used to be.
I'll keep trying though
-
Have you cloned the libraries to your local repository when testing a sketch?
-
@hek said:
Have you cloned the libraries to your local repository when testing a sketch?
This is what I do....
I go to one of the pages which gives instructions on how to make a sensor. Here is one: http://mysensors.org/build/ethernet_gateway
For this example, I then scroll to the sketch example and I chose to clone and edit.
A new tab opens and this message comes up:
Heads up! This sketch uses the following personal libraries:
DigitalIO
MySensorsIt asks me what I want to do: Clone sketch and libraries, clone just the sketch or leave. I choose clone sketch and libraries.
From here I chose the board and ask it to verify, and it fails, telling me that there are 62 errors.
When I hover the mouse over #include <stdarg.h> it says "File not detected"
When I first found this site a long time ago, and Codebender was just impliemented, it was always working. My guess is that libraries aren't being kept updated?? I am now just building the sketches on my computer without using Codebender, but when I first started playing with the fact that Codebender was so easy and user-friendly helped heaps.
-
Hmm...strage. I just did exactly what you did (with a personal codebender account).
It seems to verify fine when I try.Ethernet is probably the worst to use through codebender anyway... as you probably need to enable SoftSPI.
-
Try creating a new personal account and then give it another go.
Just quickly, I have tried these sketches and none will compile:
- Motion sensor
- Relay Actuator
- Dallas Temperature Sensor
- Light Sensor
Out of 4 sketches, none of them worked. My guess is that if I had the time and tested them all, that I would have the same problem.
Each time I try to verify the sketch, I get 62 errors.
-
I just deleted all personal libraries and re-cloned them from mysensors. Still works fine for me when verifying an example.
Does the cloned libraries pop up under "Personal Libraries"?
-
@hek said:
I just deleted all personal libraries and re-cloned them from mysensors. Still works fine for me when verifying an example.
Does the cloned libraries pop up under "Personal Libraries"?
Yep it does. Maybe it is my browser, because I still can't get it to work...
Anyways, I now do it all on my computer, and if no one else if having issues with Codebender, then let's not worry about it, coz it must be an issue on my end... I do wish though that I knew what was wrong...
-
What is your codebender username? Maybe I could ping the codebender-team and ask them if they can spot the problem.
-
My username over there is bajaguy75
It would be a bummer if others are having issues too, because being able to use Codebender certainly got me excited to work on these, because it was just so easy. But if I am the only one with the issue, then that's fine, because at the moment I am trying to learn to do this on my computer anyways.
-
I am always getting a missing (file not detected) stdarg.h library with the Ethernet gateway sketch on codebender but no compiling errors. Is there any where to download this file? Its not in the Ethernet gateway download either..
-
MySensors is now the most popular CodeBender user