Most recent activity
-
I'm not having much luck with the CLI over BLE
Connecting to 'c8:71:9f:36:a5:ee' Connected ******************************************************************** * No list of built-in modules found. If you get 'Module not found' * * messages for built-in modules you may want to connect to a board * * with '-p devicePath' or use '--board BOARDNAME' * ******************************************************************** Module neopixel not found
I'm setting puckjs in the jobfile
I've actually noticed this not found warning in the web ide - but scripts seem to work, so I've not paid much attention
The file seems to write - but leaves the device in a semi-broken state.
The file doesn't actually run - and subsequent attempts to connect via the web ide connect ok, but the repl is broken, sometimes I get this in the repl:
>Uncaught Error: String too big to convert to float at line 1 col 547 ....stringify(process.env),">>",">")
I'm thinking of hooking an FTDI USB-serial adapter to see how much of this is specific to BLE
-
Has anyone tried wrapping
https://github.com/kmackay/micro-eccInto an Espruino library?
This Nordic page implies the Puck's processor should handle it:
http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.0.0%2Flib_crypto.html&anchor=lib_crypto_installingIt looks like this is the approach to wrapping it:
https://github.com/espruino/Espruino/blob/master/libs/README.md -
Thank you both - I tried to look at the nrf52 datasheet which has register tables, and the scant examples of the peek API - but I wasn't able to get them put together. How does one sort out what peek address to use for a given output pin?
And FWIW - my approach of using auto [x = digitalRead(5); digitalWrite(5,x)]seems to "work" without any visible blink in the LED - not sure what is actually happening at the microsecond or less level. Wonder if espruino is somehow doing both in essentially one step?
-
While I can maintain the state of the LED in the JS impl - I would like to be able to just read the register for the digital pin connected to an LED
Arduino seems to support reading from and OUT pin
https://stackoverflow.com/questions/6160963/how-can-i-digitalread-a-pin-that-is-in-pinmode-outputBut this does not work the same/expected way in Espruino:
pinMode(5, 'output')
=undefined
digitalWrite(5,1)
=undefined
digitalRead(5)
=0I can sort of get what I want by using pin auto mode and making sure that every read writes back itself like this:
pinMode(5)
digitalWrite(5,1)
var x;
x = digitalRead(5); digitalWrite(5,x)
x
=1But I was thinking there should be a way I should just be able to read the state?
I'm guessing I could use peek* functions to get at the register directly? But that seems very un-espruino like from a dev-ux POV
Any ideas on the right solution here?
I wanted to use the ECDH in that lib to establish a shared key that could then be used with AES, and probably the ECDSA to sign a JWT token.
For now it is all moot as I'm using NUS and JSON for data during prototyping, and that means the full memory of the SW is available to anything that connects to that service, but just trying to think ahead a little on the security patterns.
Thanks for those other links - it actually looks like a relatively easy port.
-P