-
That'a a very good question, and a good proposal. How would that work for people that already has a fork? Not used to the GitHub editor, but could anyone propose changes directly on the files in f.ex /Espruino or would they need to then locate the same file/line in the forked repo under their account?
Apologies for the long blurb to come:
In a very 'typical me' fashion, my brain started spinning and here's my initial thought:Another way to encourage these kinds of contributions (and this would've applied to the situation I was in yesterday) would be to have some kind of listing of places where documentation is considered lacking or out of date. Something like wikipedia has.
When I made this very small PR I was actually looking for more things to do, but gave up.What if sections in the doc had some links like "edit", "lacking" or "out of date" and then these could append to a list somewhere (except edit, which would either point to file@line or open an editor on github if that is feasable). These links could of course toggle their visibility on hover, or by clicking a "contribute" button in some standard location on each page.
I don't know if your site is purely static or if you have some kind of language serving them, but if you do have a server side language - I could help write the simple tool for this. It should be relatively simple to make an endpoint:
- POST /report/needwork?description=headers not documented&file=/path/to/filename.c&line=12
- DELETE /report/needwork?file=/path/to/filename.c&line=12
If a section in docs needs work, then user clicks "out of date" and a POST is sent. Then, when it is fixed - either the fixer or the next user that comes along can certify the fix by clicking again, causing a DELETE.
This would then be completed by a route which generates a view of these entries.description | github link headers not documented | jswrap_http.c@236
You would then need to have a script running on the doc pages that determines if any given section is in need of work or not, changing the "out of date" link to something like "up to date".
EDIT: mockup of edit/report per section feature attached as image
- POST /report/needwork?description=headers not documented&file=/path/to/filename.c&line=12
-
You can either let the manufacturer do the 'panelizing' for you, or you can do it yourself.
More info from the great EEVBlog
PART1: https://www.youtube.com/watch?v=VXE_dh38HjU
PART2: https://www.youtube.com/watch?v=Uemr8xaxcw0
PART3: https://www.youtube.com/watch?v=2zGisPMNstI
Most use the same drill as they do for through holes and vias etc. That way, you only align the panel once.
EDIT: Didn't know this forum embedded videos, sorry for wasting so much vertical real estate with this
Love the PCB for the Pico @Gordon, lovely solder mask too <3
-
I looked at that Xively sample (that's how I discovered the
headers
field, it's not documented in the reference - maybe it should be added?).It's an OData backend, my guess is that they enforce it somehow, either OData standard, or the .NET implementation of it.
I have a working workflow now, so all is good :)
EDIT: Because I realized I could add the simple ",headers" to the doc string myself I did and made a PR for it here.
-
Seems to run the same chip as this http://www.espruino.com/ReferenceHYSTM32_32?
EDIT: maybe it's the exact same board, without LCD? -
I guess he's thinking in the line of writing server side code that controls espruinos in an API-like fashion, rather than simply sending it serial commands?
Something like
var espruino1 = new Espruino("/dev/tty..."); espruino1.LED1.set(); //and maybe a simple way to wrap into custom code espruino1.myFunctionOnEspruinoBoard(); //EDIT: a very simple implementation could do espruino1(function(){ LED1.set(); }); //then simply toString and send over serial
-
While I wrote my post I disconnected my Espruino. Now, after plugging it in and uploading the changed code (with
headers:
) it works!However, if I reset the board and try again - the problem seems to occur again.
Spending a few seconds (10-15 seems to do the trick) between each test is somewhat of a productivity sink, but I can live with that...
Sorry for posting before trying the 'obvious'
Did you turn it off and on again?
-
Hi! I'm having an issue that I don't know how to fix.
I'm using code similar to this:
var wlan = require("CC3000").connect(); wlan.connect("SSID","PASSWORD",function(s){ if (s=="dhcp") { var payload = { NodeId:1, Channel:"temperature", Value:23.5, Metric:"celcius" }; var strPayload = JSON.stringify(payload); var options = { host: 'requestb.in', port: '80', path:'/wt3kigwt', method:'POST' }; var req = require("http").request(options,function(res) { console.log('STATUS: ' + res.statusCode); console.log('HEADERS: ' + JSON.stringify(res.headers)); res.on('data', function(data) { console.log(" " + data); }); res.on('close', function() { console.log("closed"); }); }); req.on('error', function(e) { console.log('problem with request: ' + e.message); }); req.write(strPayload); req.end(); } });
Check results here http://requestb.in/wt3kigwt?inspect
For this I get
Content-Length: 0
which is a problem because my API needs this header to function properly (can't do anything about that) so then; let's try to add the header:var options = { host: 'requestb.in', port: '80', path:'/wt3kigwt', method:'POST', headers: { "Content-Length": strPayload.length } };
Now, one of two things happens:
- Socket error -1 while sending
- The espruino simply hangs, last output is
>echo();
I have tested this with both 1v73 and 1v74, I have yet to make a successful POST to my API.
Any ideas?
- Socket error -1 while sending
-
-
the definition for digitalWrite() where the Arduino guys did that work for you gets compiled in.
I'm not trying to derail the thread, but these definitions are made by Hernando Barragán of the wiring framework. One of the Arduino founders were his professor and then started Arduino based off Hernando's master thesis project (and yes, I'm affiliated with Wiring as a core team member, I apologize for mentioning this here, I have not publicly done this before but it annoys me [much more than Hernando, he's the better man in all this]). </rant>
To be on topic: I've tried a lot of various boards and ecosystems. This is my favorite.
It's also easy to use Espruino first to learn how to program against hardware (and I completely agree with DrAzzy, the only way to really learn is to make a project). If you feel like you want to learn C, you could then pull down the Espruino runtime from GitHub and extend it there and further educate yourself as a programmer.It is beginner friendly, and open for diving into the more bare-metal world of C.
Good luck! -
After thinking on it some more I completely agree. I come from the Wiring/Arduino pattern of thought where the target audience is not a developer but a non-cs creator. In that context, linking to github archives directly can be scary but that does of course not apply for Espruino (FWIW; I did not really propose to host the repo, just the compiled .html from the .md file).
-
As I see it you have two questions:
- How should you handle external resources (videos, links, repositories etc)?
- Would you concider splitting /Tutorials into
- Tutorials (step by step guides)
- Examples (example usages and solutions to recurring problems/tasks, such as setTimout|Interval|Watch
- Projects (complete user contributed projects)
- Tutorials (step by step guides)
(I always get too engaged in these kinds of things so please feel free to ignore everything I say here...)
I imagine that a way to do it would be to define the following kinds of external resource:
- (github) Project (a complete and tested project, maybe with README.md, project.js and parts.txt which describes the parts needed to complete the project)
- (github) Example (README.md <- entire example in one file with images in repo or in /img)
- (github) Tutorial (README.md as the introduction laying out the intent etc, then append part1.md, part2.md ... partX.md before building the resulting HTML)
- (vimeo, youtube, ???) video resource
Then, you could have some JSON files in your EspruinoDocs i.e examples.json, projects.json and tutorials.json. Contributors could then make a PR with an addition to one of those files ("add ESP8266 as Access Point tutorial"). If you accepted, we could extend the EspruinoDocs build to pull in the various resources, compile HTML and link in to them as an espruino.com page (probably a good idea to link to the github issues for reporting problems, then maintenance is on the contributor).
I could also write up a small script to 'format' anars' samples if he would accept it.
That's my all-to-many bytes on the matter. What are your thoughts @Gordon?
- How should you handle external resources (videos, links, repositories etc)?
-
That resource would be much better if it conformed to the style guide (and practices) of Espruino. Even better still, if they were contributed to the official documentation. I guess a collection of examples / cookbook is something that could fit well somewhere here https://github.com/espruino/EspruinoDocs
-
-
-
you could try to run http://www.espruino.com/Reference#l__global_reset before eval
-
I tried to add firmware updates using
Espruino.Core.Flasher.flashDevice(url, callback)
but could not manage to get it working during my 5minutes break. It sure would be a nice feature, but for now I'm happy withmake serialflash
EDIT: I need to investigate that udev thingy, will be handy when deploying to ~40 espruinos in a month or two
-
-
Have you seen this http://www.espruino.com/Project+2 ?
-
Added support for multi-board upload. Might be handy for more people than me https://github.com/espruino/espruino-tools/pull/1
Excellent tool btw!
-
-
-
Hi :) I think your answer is already answered but I just wanted to urge you to create a thread for your project over at the Projects sub forum!
Have you decided on a sensor yet?
-
I'm currently using a VirtualBox VM like you outline in the GitHub Wiki but I'm going to dualboot linux soon :)
I'm still mostly working on the web backend for my project - and for that I need my beloved Visual Studio.The espruino-tools looks interesting. When I get a complete install I'll pull down the projects and have a look!
I just posted this in case anyone else needed some quick and dirty way of working with many devices on windows through ST. Not really intended to become anything more than it already is (and let's be honest - that's close to nothing). When time comes to focus on the Espruino side of the project I'll see if I can make some contributions to espruino-tools project.
-
Hi!
In a project I'm currently working on I need to update the current program on many Espruino boards. The Espruino IDE is very good, but because of what I presume is a Chrome-related bug I'm having unstable results when unplugging/replugging boards at the frequency I do.
So, I made a quick solution for working with Sublime Text.
Follow the instructions:Get the EspruinoUploader.exe. Either check out the project https://github.com/AlexanderBrevig/SublimeTextEspruinoUploader or download the attached EspruinoUploader.exe.
In Sublime Text go Tools -> Build System -> New Build System
Paste this code (replace YOUR/PATH/TO with the actual path)
{ "cmd": "C:/YOUR/PATH/TO/EspruinoUploader.exe $file_extension 9800 $file", "working_dir": "$project_path", }
Locate or create C:\Users\USER\AppData\Roaming\Sublime Text 3\Packages\User\JavaScript.sublime-settings and paste this (replace USER with the correct username for your Users folder).
{ "extensions": [ "com3", "com4", "com5", "com6", "com7", "com8" //just continue for how many you need ] }
Maybe you'll have a master on COM4 and a slave on COM5, then name your files master.com4 and slave.com5.
Shut down Sublime Text, now open and navigate to master.com4 (make sure your Espruino is connected to COM4)
Select Tools -> Build System -> espruino and hit Ctrl + Shift + B
SUCCESS!
One slight annoyance is if you want the same code uploaded to many different COM ports. Currently I use a simple Node.js file watcher thingy that simply writes the contents of one file to the others.
I've not decided how to fix that. Any ideas?
but it may be that I have to program and test each board manually!>
Maybe you could make some kind of JTAG panel with nails that you drop on top, and then use JTAG for boundary scan and even some firmware tests if needed?
You could then at least test for shorts and such with relatively few operations per panel. Not sure what kind of things you're testing so this suggestion could be stupid...
Can I ask which manufacturer you used? It looks very high quality.