Most recent activity
-
I use Espruino with TypeScript and was a bit disappointed at the time that the Typescript goal of the last campaign was not reached.
So I tried to generated a file
espruino.d.ts
by myself but gave up. It's seems not possible to generate good TypeScript definitions from the other type files (e.g. espruino.json). There are more informations required than available:// This class should be automatically generated. class I2C { // ... readFrom( address: number | { address: number, stop: boolean }, quantity: number ): Uint8Array; }
But the corresponding jswrap comment is
/*JSON{ "type" : "method", "class" : "I2C", "name" : "readFrom", "generate" : "jswrap_i2c_readFrom", "params" : [ ["address","JsVar","The 7 bit address of the device to request bytes from, or an object of the form `{address:12, stop:false}` to send this data without a STOP signal."], ["quantity","int32","The number of bytes to request"] ], "return" : ["JsVar","The data that was returned - as a Uint8Array"], "return_object" : "Uint8Array" } Request bytes from the given slave device, and return them as a Uint8Array (packed array of bytes). This is like using Arduino Wire's requestFrom, available and read functions. Sends a STOP */
The important information of parameter address is only in the description. :-(
Currently it is required to write the TypeScript type definition by hand but there is always the risk that the type file will become outdated.
@Gordon: Do you have an idea how it can go on in the long term?
-
Breakout board with MAX30100
http://www.ebay.de/itm/182342028548 -
When using the switch you need pin 5 of the rotary too.
Rotary → Pico
5 → 3.3V
3 → B5 (or any other input pin)As @ClearMemory041063 mentioned above it is easy to watch a pin:
// some untested code pinMode(B5, "input_pulldown"); setWatch( function( event ) { console.log( event.state ? "Button released" : "Button pressed") }, B5, { repeat: true, debounce: 50 });
-
-
-
-
-
@user70843
Are you serious about that? My first thought was: It's a joke. But why on Dec 3rd? May be April Fools' Day in another country? :-)Java was used in a variety of things ...
My two cents to the importance of Java - unrelated to Espruino.
Java is really dead - running as applet in the browser!
On the server side it is very popular. The biggest shopping systems, ERP, telecommunication, banking, energy sector applications, .. a majority of the "enterprise" things run on Java.
By the way the most popular mobile platform is largely built with Java.Java and JavaScript are both not common in embedded programming. But latter is changing with Espruino. ;-)
Yes, the HTU21D is a SHT2x clone or vice versa.
Tomorrow I can check the module with a real sensor, but I already think it will work for me. There hasn't been any code change since I last tried it.
@Jean-Philippe_Rey
Could you try the other methods? Especially the synchronous variants
readTemperature
andreadHumidity
. I'm a little surprised, as the CRC-check didn't show any errors.Which board do you use? I tested the module with a Pico.