-
A colleague (Philippe Ardit) and I are working on an AHRS (Attitude and Heading Reference System) based on the Puck.js 2.0 (or 2.1) (as 1.0 is not equipped with an IMU (Inertial Measurement Unit)).
This is a complete novel field for us and I was wondering if some people out there have already developed such a system?
Preliminary code from Philippe for the Puck.js is available at: github.com/PhilippeArdit/espruinoSandBox > Some test results > Some Espruino tests (I2C scan, AHRS cube, ...)
You need to click on this latest link, to select Puck.js, click on connect (pair your specific Puck.js) and then on Show AHRS Cube, to try the code that shows a cube moving in coordination with the Puck.js. (Press reset to stop the Puck.js from emitting.)
It is inspired from the Bangle.js Data Streaming > Bonus 3D Rendering Espruino original tutorial code, with main differences being that:
- not only accelerometers are used, but gyros as well,
- and a cube with named faces and reference frames is shown.
However, we are not satisfied with the performances: Mainly because making a full rotation about whatever axis doesn't bring back the original orientation in the display.
Certainly the magnetometers should be incorporated to be able to track a direction in the horizontal plane, but other inconsistencies make us think that filters, refreshing rates, or whatever other parameters or algorithms need to be implemented/tuned in a better way.
Any help would be appreciated~~
- not only accelerometers are used, but gyros as well,
-
After noticing some sporadic deconnections of my Puck.js 2.0b from BLE while manipulating it, I had a closer look at it and discovered that the metallic plate supposed to hold the battery in place was disconnected on one of its side. Hear me out: the PCB copper parts are not teared out, but the factory soldering process seems not to have worked optimally to hold the battery plate in place (see below picture). I think this is a quality issue (even though, I confess, I might have removed the battery too many times without taking too much care while doing it), and this should be addressed for new batches I believe. On my Puck.js, some soldering should do the fix. I also noticed that on my Puck.js 1.0e, the battery holding plate is mounted using through holes, which might be a tougher solution.
-
I am also getting some errors with my custom Bangle.js App Loader:
It works fine on my personal Github.io pages
...but it doesn't work as expected on my local Synology server.
(I prefer this solution to avoid waiting for Github.io pages to update.)Hence, when I select Bangle.js 2 no app is shown in the list of available apps. See below messages:
I can view all the apps, if I select All Apps instead of Bangle.js 2 though.
I can connect to my Bangle but the apps already on it appear this way in the App Loader:
Did anyone encounter such issues? -
-
Do you have any clues if this modest throughput (1-2.7KB/s) is due to BLE limitations or more to the Espruino interpreter slowing down the transmission process?
I am thinking of coding a simple BLE-serial passthrough adapter based on the examples provided. I would like it mostly to transmit data, but also to react to a specific sequence (key word after a given rest period in that data flux ~AT commands), to toggle a pin. Do you have any idea on how it should perform compared to other BLE-serial devices out there (like the HM-10) regarding throughput?
-
edit: this also explains why a refresh worked for me - everything would already have been cached by the second reload, even if I could get it to break the very first time I tried it.
It's not that important now that the emulator is working again, but still, I wonder why this trick didn't work for me too...
-
-
As I explained in post #53 as soon as I click the 'Emulator' button, and as the Emulator pop-up opens, it's canvas is immediately populated with viewable content.
You mean with viewable content coming from your code right? Not the default Bangle.js boot content?
Indeed I am surprised of this... I thought the process was to connect first (to see the default Bangle.js boot content) and to save the code from the right hand side panel in a second step to see how it performs in the Emulator. According to what you say, I must be wrong. I thought such behaviour would occur only in presence of&upload&emulator
at the end of the url...What I remember for sure is that I was able to experiment typing some operations in the WebIDE's REPL directly (left hand side panel) once connected to the emulator, which currently I can't.
-
-
That day I was experimenting with the 2x3 Pixel Clock accessible at https://banglejs.com/apps/#clock. Just click on the Try in Emulator icon and it will bring you there. Code line number 28 will match.
But really, my issue occurs whatever the code in the right hand side panel is (the panel can be empty). It occurs when I want to connect the WebIDE to the Emulator (Connect / Disconnect plug icon > Emulator). At this stage, I am not uploading any code from the right hand side panel into the emulator yet.
Do you see the above code block with a fresh start of the browser pointing to http://www.espruino.com/ide/ ?
What I see is the latest code I played with: currently it is code of the 2x3 Pixel Clock. If I clear cookies and other site data from Chrome, I get this in the WebIDE right hand side panel:
var on = false; setInterval(function() { on = !on; LED1.write(on); }, 500);
...which is the panel default content I guess. But when trying to connect to the Emulator, the problem of getting a white emulator window still occurs.
-
@sebi I don't know how plainly we may request, please post the file that is being uploaded as in post #35 Let's rule out that code block, or upload the default code block and provide the default file error output.
I would like to help but I still cannot figure out how to do what you ask for...
You mean post 25 right? (post 35 is mine with some screenshots.)Steps:
https://www.espruino.com/ide/
Orange Connect Button :: EmulatorDone!
Carret inside Emulator Window
Fn+F5Carret? Fn+F5 is to brighten the keyboard on my computer??
What I understand is: select the Emulator Window and refresh it.Done!
I am not familiar with the Developer console and I don't know how to generate the log files the way you did. Instead I took some screenshots and posted them in the forum. With further explanations I can try to post what you ask for.
If by "the file that is being uploaded" you mean the file that is being sent from the WebIDE right panel to the emulator, this file can be empty. If you ask for the file that is being executed by Chrome, it is supposed to be the one obtained when navigating to http://www.espruino.com/ide/. I hope my computer does not interfere with that file and leaves it genuine (no addon modifies it). Maybe there is a way to save a copy of the exact code that is being executed by Chrome and this is what you ask for?
Regarding the refresh process, I couldn't try it to verify it but, from what I understand, if the Emulator is working properly and you refresh that Emulator screen, you will lose the connection with the WebIDE resulting in a white screen for the Emulator. Is this correct?
So one hypothesis would be that my Emulator window gets refreshed unintentionally at start leading to a connection loss, right?Thanks @TTBangler for trying to help too!
-
I am able to see parts in post #35 and that appears to me not the default that is loaded when one launches the web IDE
That is very strange to me... If I understand right, by looking at my Chrome's developer console you didn't recognized the sequence of code that should be executed normally. Is that it? Currently I am clueless, and don't know what could be interfering with running Espruino WebIDE code the normal way on my computer.
-
Unfortunately not...
While I got your email yesterday, I was connected using FortiClient VPN to my company's network, and I noticed the Emulator was working properly.
Today as I restarted the emulator, it wasn't working anymore, so I tried following your steps but it didn't help. I also tried reconnecting to my company network but still, the Emulator didn't work. In between those tries I made sure to close properly Chrome and to clear cached images and files, cookies and other site data. -
Would you mind responding to post #38 so that I may run the same congruent test.
You want to know my hardware, Win10 ver, WebIDE ver and Chrome ver, right?
- MacBook Pro 15" Retina A1707 late 2016
- Windows is running under Bootcamp (not in a virtual machine).
Windows 10 Pro x64 is up to date: Version 21H1, OS build 19043.1165, Experience Windows Feature Experience Pack 120.2212.3530.0 - Espruino Web IDE is up to date: Version 0.75.8
- Google Chrome is up to date: Version 92.0.4515.159 (Official Build) (64-bit)
Is this enough information?
- MacBook Pro 15" Retina A1707 late 2016
-
Should I be jumping in
Please step in! I feel alone with this issue.
If you post your configuration I'll know more what you want to compare exactly.What language is your system set to?
Indeed I encountered an issue in the past on my computer that was due to Windows language settings. Windows is the french version, but I switched every aspects to english. Under the hood there must be some leftovers of french thought. The issue had to do with the Windows Sandbox not being able to launch due to those unusual language settings. The issue was registered by Microsoft at first and eventually fixed. Maybe this can help.
-
-
-
The emulator is not working anymore (for an unknown reason).
I tried my recipe quickly but it didn't fix anything.
I guess I'll have to do further experiments (like rebooting in-between these steps) to see if it helps...I think I did shut down several times Chrome during the whole time I was having trouble with the emulator as I am used to switching between OSs quite often (which involves rebooting, thus restarting Chrome) and this issue is present on my computer for a long time now.
-
FYI: I just launched chrome the normal way (WITHOUT
--disable-extensions
) with all the plugins enabled and... the emulator is working properly again!It's driving me crazy because I didn't even deactivate one single extension this time (adblock is activated but disabled on the whole Espruino domain automatically as always).
So the only conclusion I have is:
- make sure to disable adblock on the FULL Espruino domain
- Shut down chrome completely (make sure it doesn't keep running in the background)
- Start chrome without enabling extensions (
chrome.exe --disable-extensions
) - Maybe perform some reboots in-between those steps
and the emulator should be working properly!
Once the emulator is working properly, chrome can be launched the normal way with all its extensions enabled.
- make sure to disable adblock on the FULL Espruino domain
-
Odd indeed...
No: adblock is turned off for all the espruino domain, which includes https://www.espruino.com/ide/emu_banglejs.html (adblock logo is greyed on that page).
I have a completely stock version of Chrome installed on Windows OS, and it is the latest version:
Version 92.0.4515.131 (Official Build) (64-bit)
To check if some addons were responsible for this issue, I just made another try while disabling ALL the addons:chrome.exe --disable-extensions
...and Hurray! I get access to the emulator again!
I thought I tried this already, but I must have made a mistake at that time, like not closing Chrome properly (that kept running in the background) because it didn't fix anything then.
I will now search for the exact addon (or setting) responsible for this issue and will let people know. -
-
I am not sure if I am following the discussion properly...
But following the standard procedure (click on Connect, then on Emulator) I get this:
Refreshing the small emulator window (not the IDE) doesn't change it remaining white and doesn't append additional log into the condole. If I close that small window to regain access to the IDE, and try to connect again, I get just a>>> Connecting... index.js:92927 Set Slow Write = true index.js:92927
more in the console.
-
If I refresh the main page (not the small display window), I have to click on connect again. Is this what you mean? Anyhow, I have tried this a few times but it didn't help.
As you were talking of something related to load order or cache of scripts, I tried with no extensions in Chrome (
--disable-extensions
) but it didn't help as well...Chrome and Windows 10 are up to date...
-
I am having a similar issue with the emulator. See:
Refreshing the emulator window doesn't seem to help.
I am on Windows 10 with a scaling of 200%.
I tried withchrome.exe /high-dpi-support=1 /force-device-scale-factor=1
but it didn't help.
I remember that the emulator used to work on my computer, but for some time already it is not the case anymore. At first I sought that the emulator server was down, but it is definitely a different story.
Any idea on how to fix that?
The Puck 2.0 was bought on September, the 27th 2021 from GO TRONIC SAS in France.
A Second one was bought on December, the 8th 2021, which was also version 2.0.
Currently they are out of stock, so I believe it was an old batch they were selling at that time...