-
Maybe add a tagging/filter system? A drop down with all the sections/subsections. I've seen this system work extremely well over at http://www.teksyndicate.com. I admit it took some time getting used to the system, but in my opinion it's working quite well. However, implementing this type of system will probably require a overhaul of the current espruino forum, which might be more work than what it's worth.
I do see Espruino becoming more popular in the near future which will require, in my opinion, a different approach to a forum organizational system. Just something to consider for the future :)
@Gordon I have a linode vps sitting idle that you can use if you want to tinker with the idea of updating the espruino forum.
-
Very, iteresting. I've always wanted to demo/test reading brainwaves, but I have always been skeptical about how well a device could read brainwaves. I wonder how well this device would work: https://www.sparkfun.com/products/12805
Although, I really like your diy approach and would probably feel less bulky than the unit that sparkfun sells and less $$$!
-
@Gordon Just so I understand all this..... onInit(); isn't needed at the bottom of the script? Did something change in the Espruino to auto run onInit() at initial powerup?
-
@Jasonwu that looks like c/c++ code not javascript. Also looks like code that would work on an Arduino.
-
@tage I have my espruino connected an edison arduino breakout serial pins and I have an issue every few minutes where the serial data would stop showing up in the Edison. I have a feeling my issue is due to the Edison going to sleep and this might be the reason why your having Bluetooth disconnecting issues. However, you mentioned every few seconds, so your issue might be entirely different.
-
@Gordon is that driver install for both the regular and Pico boards?
-
-
I've been demoing out different ways to use waveform and come across an issue when using both setInterval and Waveform. the issue is: I am not seeing my temp output in the console.
Code:
var w = new Waveform(128/* your buffer size */,{doubleBuffer:false, bits:16}); setInterval(function() { var myarr = w.buffer; myarr.sort(); // cut off first and last 2 elements var view = new Uint16Array(myarr.buffer, 2/*sizeof(uint16)*/*2, n-4); var vOut = E.getAnalogVRef() * E.sum(view)/(view.length*65536); // if you attached VOUT to Ao var vZero = 0.4; var tCoeff = 19.5 / 1000; var tempinc = (vOut - vZero) / tCoeff; var tempinf = tempinc * (9 / 5) + 32; console.log("Temp in C: " + tempinc); console.log("Temp in F: " + tempinf); //console.log(E.sum(view)/(view.length*65536)); // start it again w.startInput(A0,2000 /* Samples per second */); }, 1000*150/2000 /* so slightly over the 128/2000 sec required for the waveform*/);
I tried setting the time higher, but I am still getting the same issue. I did, however, place a console.log ("start!") Inside of the startInterval as the first line and start! was sent to the Console successfully.
-
@Gordon I was playing around with waveform and I see two major improvements: the IDE is still responsive and the code seems to run quicker than my original temp code. Thank you for the help and the recommendation to use waveform :)
-
I am receiving this error and don't know why or how to fix this:
Uncaught InternalError: Timeout on ADC at line 6 col 30 var vOut =
E.getAnalogVRef() * E.sum(view)/(view.length*65...Code:
var w = new Waveform(128/* your buffer size */,{doubleBuffer:true, bits:16}); w.on("buffer", function(myarr) { myarr.sort(); // cut off first and last 2 elements var view = new Uint16Array(myarr.buffer, 2/*sizeof(uint16)*/*2, n-4); var vOut = E.getAnalogVRef() * E.sum(view)/(view.length*65536); // if you attached VOUT to Ao var vZero = 0.4; var tCoeff = 19.5 / 1000; var tempinc = (vOut - vZero) / tCoeff; var tempinf = tempinc * (9 / 5) + 32; console.log("Temp in C: " + tempinc); console.log("Temp in F: " + tempinf); //console.log(E.sum(view)/(view.length*65536)); }); w.startInput(A0,2000 /* Samples per second */,{repeat:true});
Console output:
Uncaught InternalError: Timeout on ADC at line 6 col 30 var vOut =
E.getAnalogVRef() * E.sum(view)/(view.length*65...^ in function called from system Temp in C: 23.71055210571 Temp in F: 74.67899379028 Temp in C: 23.79099063384
Temp in F: 74.82378314091 Temp in C: 23.64845636164 Temp in F:
74.56722145096 Temp in C: 23.66374898568 Temp in F: 74.59474817422 Temp in C: 23.74768151969 Temp in F: 74.74582673545 Temp in C:
23.74994383879 Temp in F: 74.74989890983 Temp in C: 23.80151123724 Temp in F: 74.84272022703 Temp in C: 23.82175939511 Temp in F:
74.87916691119 Temp in C: 23.81015918605 Temp in F: 74.85828653489 Temp in C: 23.89451469519 Temp in F: 75.01012645134 Temp in C:
24.03446761515 Temp in F: 75.26204170727 Temp in C: 23.78549651722 Temp in F: 74.81389373101 Temp in C: 23.70157938435 Temp in F:
74.66284289184 Temp in C: 23.76887558668 Temp in F: 74.78397605602 Temp in C: 23.74900409502 Temp in F: 74.74820737105 Temp in C:
23.81278517307 Temp in F: 74.86301331153 Temp in C: 23.78265742766 Temp in F: 74.80878336979 Temp in C: 23.82784904577 Temp in F:
74.89012828240 Uncaught InternalError: Timeout on ADC at line 6 col 30 var vOut = E.getAnalogVRef() * E.sum(view)/(view.length*65...^ in function called from system
-
@Gordon I'm a little confused about how the sampling works in the StartInput. If i create a buffersize of 128 does the StartInput average out the 2000 samples then store the averaged sample into the buffer and do that 128 times?
-
@Gordon the Waveform that you recommended will come in handy. I was looking for away to trigger the other sensor readings once the espruino receives the temp. The temp is needed first before I request the other sensor readings.
I will respond back hopefully in a couple days with my results/issues.
-
@alexanderbrevig This might be too soon for me to ask... I was wondering how far you have gotten with the WizziMotes? I purchased a couple of panStamps, one for the Gateway and one to connect to the Espruino. The panStamps can be used as standalone, but I plan to communicate back and forth between the espruino and the panStamp either I2C or uart. I've gotten no where on utilizing AES encryption and gave up on the idea and resorted to your idea of off loading encryption to another chip. Since the panStamp does:
CTR is implemented in the CC430AES class, which is the cipher method
used by SWAP. CTR, unlike some other methods, allows encrypting and
decrypting variable-length packets. First four bytes from the packet
(destination, source, hop/secu and nonce) are used as the initial
nonce for the CTR algorithm.I plan to program the panStamp to send any incoming packages to the espruino and vise verse. I shall see how that idea works. I don't have any of the boards yet and hope to receive them either this week or the next.
-
@alexanderbrevig just out of curiousity, do you use any ad blocking software? When I use adguard, sometimes I receive timeout errors on websites. Although, I've never personally come across the error you received.
-
Hi @allObjects I tested your theory (10000ms) and that gives me plenty of time to type in the terminal. I will use your visualization to time how long i will need to set the setInterval. Again, like always, thank you for your help and explanations.
-
@allObjects thanks for updating my post. I will definitely impliment bind().
-
Hi @Gordon I have been meaning to update this post. It seems to be my code. In order for me to send code or save() I need to execute clearInterval(Interval). Also typing clearInterval into the terminal lags. One letter after another appears. After clearInterval is executed the lagging stops and the IDE becomes reaponsive. I have a feeling my temperature code is the culprit. My temperature code: http://forum.espruino.com/comments/11973561/
-
@alexanderbrevig your project looks magnificent! What cad software are you using to create your board?
-
Hi @Gordon. I have a few questions:
How is the testing going?
When will you approximately start shipment?
Will the backers receive an email when their package has been mailed along with the tracking #?
Does anyone know how long it usually takes to receive a package in the US from the UK?
-
@Joakim Interesting... I remember I asked a question about .bind() in one of my other posts. I will have look more into .bind() .apply() and call()
-
@allObjects Thanks for your explanations and example code. I have such a limited knowledge of Javascript and I am learning tuns about javascript from my project.
I wrote the majority of my pseudo code out on a piece of notebook paper at a coffee shop a few months ago. It's amazing how simple I though my code was going to be until I actually sat down and started writing code.
I have no idea how individuals such as @Gordon do this for a profession. I write code that sorta works, take a break and then I completely forget everything that I wrote or how it works. Eventually, I will have an 'ahha moment' and all this code will make sense.
-
@alexanderbrevig if you have time, can you post a review on the WizziMote(s)?
I did a quick google search for: CC430F5137
and stumbled across: http://www.panstamp.com/ which seems interesting. I think it can do mesh networking and has AES128 encryption. -
Well I spoke too soon. The IDE stopped responding. Putty can connect, but I can't type anything into the terminal. This is really frustrating.
I use multiple timeouts in my code.... I wonder if that causes the IDE to stop responding to the Espruino?
Is there anything I can do? Such as create a function that waits for bnt1 press? Then once bnt1 is press execute some sort of halt() function?
@Dennis Thank you for wanting to sell the headset a good price. Right now I have so many projects that I am working on that need to get finished at some point before I take on another. Thank you, though.