-
@Gordon sure - will do. Just waiting for the acrylic case I ordered last week - maybe I'll get something finished this week. Will use a RJ45 connector with the socket mounted to the VM (velomobile) so I can take it out for updates or inspection...
-
@Robin thanks. You are right. I already started an inquiry and got the first response.
Maybe they can send me one or two spare displays.
But shipping will take a while - so I also ordered another Pixl.js from a German supplier.
You can't have enough... ;-) -
@Gordon I hoped you would say that ;-)
-
Thanks @allObjects, @Gordon - I just ordered this one here: https://www.ebay.de/itm/322375559510 and see if it fits.
If not, I can still use it with my Puck or Pico I guess. -
Unfortunately I just broke my display.
Something hard and heavy dropped onto it and the upper half now stays blank.
I guess I cut parts of the ribbon cable...Any chance to get a spare display or just buy a whole new Pixl.js?
I am glad I bought everything in pairs - so there is a spare Pixl for my current development left.. -
Currently I'm working on a sort of bicyle computer using a Pixl.js
It is for a velomobile (DF-XL) and should not only display speed, cadence and mileage, but also watch my battery status.
The velomobile does not have a dynamo and uses a LiPo battery to drive light, indicators, horn and charge equipment via USB. On longer trips it is important to have enough battery capacity (and spares) - especially when riding in the dark.
So I successfully interfaced an INA226 and show voltage, current and roughly calculate the charge percentage. -
Thanks @Gordon.
Meanwhile I tried theBluetooth.setConsole()
and it works.
Now I understand what it was about.
The other thing is only cosmetic. No trouble currently, but sometimes I am trying to be a perfectionist. Actually there were two things why it struck me:- I am using the screen 9o° rotated so the Logo appears sideways. Looks a bit odd.
- My onInit() did not do the screen refresh right away, but only a
setInterval()
so there was a delay till my own layout took over. I have fixed this now.
But for the "final touch" I will probably consider doing something about the startup animation. If you don't mind. ;-)
- I am using the screen 9o° rotated so the Logo appears sideways. Looks a bit odd.
-
@AkosLukacs - ah. Thanks a lot!
-
@Robin thanks for your reply.
My code is still in early stages. Advertising a CSC and battery service already works as far as I can check with NRF toolbox on my phone.
I also successfully connected some I2C modules for voltage and current measurement (energy monitoring of my Lipo on-board battery block for light) and RTC (which is a bit bulky but somehow works too).The output is the lines "Bluetooth" being written to the LCD when a BLE central (phone or laptop) connects or disconnects like you can see here: https://youtu.be/pawHDr4i3jI?t=126
It is the same output written when you just see the boot screen and no code is loaded.But it still seems to happen with my code running and somehow interferes with my "g" screen outputs. It will disappear on the next update interval with g.clear() and g.flip() but you will notice it as a flicker sometimes.
-
Thanks @MaBe for the link.
It seemsjswrap_pixljs_init()
is causing the output after initialization just before I do the g.clear() and g.flip().
To avoid this I guess I'd have to patch it and compile my own firmware?
Or is there some more elegant way around this?The function also seems to contain some button magic like self test that would be missing if skipped altogether...
I'll look into this some more tonight after work.
Thanks for the pointer. -
After quite a while of Espruino abstinence there is a new private project for me: a bicycle computer.
When uploading code, doing a save() and a power cycle there is still the Pixl logo showing up before my code takes over the screen.
Also when connecting or disconnecting via bluetooth sometimes output shows up for a fraction of a second.
Where does that all come from - can it be disabled or avoided?Thanks for any pointers.
-
-
@Gordon, thanks for the quick reply.
Yes, Web IDE works.
It's not an external bluetooth adapter, but the internal one of a MacBook Air 11"The reason I was adding to an old threat was that I found the thread during my troubleshooting and thought it could fit here for some continuity reasons - sorry. Also the original people involved may have experienced something similar or different meanwhile.
I can start a new one if you think that is better.This is the output with verbose:
$ espruino --list --verbose 0.1.9 Espruino Command-line Tool 0.1.9 ----------------------------------- Acorn library not found - you'll need it for compiled code Found /usr/local/lib/node_modules/espruino/libs/targz.js Found /usr/local/lib/node_modules/espruino/libs/utf8.js Found /usr/local/lib/node_modules/espruino/espruino.js Found /usr/local/lib/node_modules/espruino/core/codeWriter.js Found /usr/local/lib/node_modules/espruino/core/config.js Found /usr/local/lib/node_modules/espruino/core/env.js Found /usr/local/lib/node_modules/espruino/core/flasher.js Found /usr/local/lib/node_modules/espruino/core/modules.js Found /usr/local/lib/node_modules/espruino/core/notifications.js Found /usr/local/lib/node_modules/espruino/core/serial.js Found /usr/local/lib/node_modules/espruino/core/serial_chrome_serial.js No chrome.serial - Chrome Serial disabled Found /usr/local/lib/node_modules/espruino/core/serial_chrome_socket.js No chrome.sockets - Chrome Socket disabled Found /usr/local/lib/node_modules/espruino/core/serial_frame.js Found /usr/local/lib/node_modules/espruino/core/serial_noble.js Noble: module couldn't be loaded, no node.js Bluetooth Low Energy Error: The module '/usr/local/lib/node_modules/espruino/node_modules/xpc-connection/build/Release/binding.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 48. This version of Node.js requires NODE_MODULE_VERSION 64. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`). at Object.Module._extensions..node (internal/modules/cjs/loader.js:731:18) at Module.load (internal/modules/cjs/loader.js:612:32) at tryModuleLoad (internal/modules/cjs/loader.js:551:12) at Function.Module._load (internal/modules/cjs/loader.js:543:3) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/usr/local/lib/node_modules/espruino/node_modules/xpc-connection/index.js:3:15) at Module._compile (internal/modules/cjs/loader.js:702:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10) at Module.load (internal/modules/cjs/loader.js:612:32) Found /usr/local/lib/node_modules/espruino/core/serial_node_serial.js No 'serialport' module found Found /usr/local/lib/node_modules/espruino/core/serial_node_socket.js Found /usr/local/lib/node_modules/espruino/core/serial_web_audio.js Found /usr/local/lib/node_modules/espruino/core/serial_web_bluetooth.js Found /usr/local/lib/node_modules/espruino/core/serial_websocket_local.js Found /usr/local/lib/node_modules/espruino/core/serial_websocket_mqtt.js Found /usr/local/lib/node_modules/espruino/core/serial_websocket_relay.js Found /usr/local/lib/node_modules/espruino/core/serial_winnus.js Not on Windows, Winnus not needed Found /usr/local/lib/node_modules/espruino/core/terminal.js Found /usr/local/lib/node_modules/espruino/core/utils.js Found /usr/local/lib/node_modules/espruino/plugins/assembler.js Found /usr/local/lib/node_modules/espruino/plugins/boardJSON.js Found /usr/local/lib/node_modules/espruino/plugins/compiler.js Found /usr/local/lib/node_modules/espruino/plugins/getGitHub.js Found /usr/local/lib/node_modules/espruino/plugins/localModules.js Found /usr/local/lib/node_modules/espruino/plugins/minify.js Found /usr/local/lib/node_modules/espruino/plugins/saveOnSend.js Found /usr/local/lib/node_modules/espruino/plugins/setTime.js Found /usr/local/lib/node_modules/espruino/plugins/unicode.js Found /usr/local/lib/node_modules/espruino/plugins/versionChecker.js Initialising CodeWriter Initialising Config Initialising Env Initialising Flasher Initialising Modules Initialising Notifications Initialising Serial - Initialising Serial Node Socket - Initialising Serial Web Bluetooth Initialising Utils Initialising Status Initialising Assembler Initialising BoardJSON Initialising Compiler Initialising GetGitHub Initialising LocalModules Initialising Minify Initialising SaveOnSend Initialising SetTime Initialising Unicode Initialising VersionChecker Searching for serial ports... No navigator.bluetooth - Web Bluetooth not enabled PORTS:
-
I remember it once worked for me too.
However, time moved on.
It's 10.13.4 now and somehow it stopped working (espruino --list
returns with an empty list - and also very quickly).Also trying to install noble (I guess it's needed) seems to have issues:
$ npm install noble (...) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: winnus@0.0.3 (node_modules/winnus): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for winnus@0.0.3: wanted {"os":"win32","arch":"any"} (current: {"os":"darwin","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bluetooth-hci-socket@0.5.1 (node_modules/bluetooth-hci-socket): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for bluetooth-hci-socket@0.5.1: wanted {"os":"linux,android,win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})
btw:
$ node --version v10.2.1
Did anyone get this working?
-
Hi! A while ago I played around with some OTA mass deployment of a puck swarm.
This is what I did: https://github.com/Whizzard/puckjs-fanout
Maybe you can evaluate and/or improve on that? -
Actually - like @oesterle said it's quite perfect as it is.
I was not aware of the many restrictions in design. I just had a closer look - much is covered with the white paint, so it seems even simpler than it is.
Regarding pads:
maybe I'm biased from my gamecontroller/joystick project, but also doable with the current version. Actually it's better to keep it simple - you are right. -
The longer I think about it: sound would be really interesting.
The more senses it affects, the better... :)And a tiny thing: If the PCB had a notch or two and a nose as counterpart in the case - that would make it easier / safer for newbies to put everything together in the right order...
Probably this will also have issues with the antenna...Regarding solder pads: I was not aware of the antenna.
Could the pads without hole maybe have a wider spacing and get holes?
There is one side with a double row with two different pitches - why? Could save some space if sacrificed...By the way: How many layers does the PCB have?
-
-
-
-
OK thanks. Ordered the board.
Seems to be needed for serious development...
I'm just chewing myself through the nordic docs to understand what happens on the lower levels...
This is the right link http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s310.api.v3.0.0/modules.html - could you just confirm? -
OK - given I have managed to create a working ZIP for OTA flashing.
A test cycle is quite complex and time consuming:
- create the ZIP
- send it to iPhone
- set Puck to Bootmode and flash (this takes several minutes)
Any hints or howtos to do it via serial connection from the commandline?
- first there is the Serial Console https://www.espruino.com/Puck.js#serial-console
- will
make serialflash
work over this connection? https://github.com/espruino/Espruino/blob/master/README_Building.md#to-flash-espruino-from-the-vm
- create the ZIP
-
Interesting.
I just tried the same (espurino --list
), also Mac OS X (MacBook Air) and have drops too.But when lowering the advertising interval like
NRF.setAdvertising({},{interval: 50})
it seems to be found in all cases.
Tried 300, 200, 100 too and still drops there.Suppose this interval will not improve battery life, but may be a hint why it does not always work?
-
OK - does not work for me either.
I have not hardcoded the MAC but search for devices with the corresponding service:
function setLight( r, g, b ) { var gatt; var c; console.log( "rgb=", r, g, b ); NRF.requestDevice( {filters:[{services:["FF02"]}]} ).then( dev=>{ console.log( "found", dev.name ); return dev.gatt.connect(); }).then( g => { console.log( "connected" ); gatt = g; return gatt.getPrimaryService("FF02"); }).then(function(service) { console.log( "service found" ); return service.getCharacteristic("FFFC"); }).then(function(characteristic) { console.log( "characteristic found" ); c = characteristic; return c.readValue(); }).then( v => { console.log( "value", v ); return c.writeValue(String.fromCharCode(0,r,g,b)); }).then( r => { console.log( "result", r ); gatt.disconnect(); console.log("Done!"); }); } var col = 1; setWatch( evt => { var long = ( evt.time - evt.lastTime ) > 0.2; if( long ) { setLight( 0, 0, 0 ); } else { col++; if( col > 7 ) col = 1; console.log( "col", col ); setLight( col & 1 ? 0xFF : 0, col & 2 ? 0xFF : 0, col & 4 ? 0xFF : 0 ); } }, BTN, { edge: "falling", debounce: 50, repeat: true } );
readValue()
correctly returns the 4 bytes (white-red-green-blue) I have written with LightBlue to Service FF02 / Characteristic FFFC before.But
writeValue()
does not do or return anything.@Gordon: You are right. LightBlue shows
WriteWithoutResponse
for the Characteristic in question by the way.Is that something the puck BLE code does not handle yet?
@Robin yeah 3-D. Right. With 128x64 B/W. ;-)
Yes, it seems Backlight is built into the LCD. I could order different colors of Screen and Backlight.
Gordons datasheet also mentions the LED color (green) and A and K connections (however, they seem not to pins on the ribbon cable...).
Meanwhile I got a quote via above alibaba link: USD 18 postage to Germany, so I ordered 4 pieces for USD 2 each + 1.30 PayPal fee = USD 27,30 (+tax probably)
So if anyone needs another spare in Europe, I may forward one or two of my units...