-
Thank you for the attempt @Gordon. Still plagued with 404 and github seems to know about it:
https://twitter.com/githubstatus
When I was able to get a valid page, still get the "No Bluetooth devices found" error.
Will give it a couple more tries, thank you for staying in touch . . .
-
Mon 2017.08.07
@Gordon,
Thank you for checking. Wanted someone with skills to validate what was supposed to be seen.Capitalisation matters
Being picky here, as there isn't any capitalization in that link ;-)
Just did a check and the site now loads fine. Maybe there was an update in progress?
However, changed the manifest file, ran the register.cmd manager. Extension Icon appears in upper right of Chrome. d/l .zip unpack and used unpacked files using 'Choose File' buttons
Running that page now gives error a device not found error:
"Status: DFU failed: NotFoundError: User cancelled the requestDevice() chooser.). Check console for details."
Opening the Javascript console didn't provide any additional detail
urish.github.io wants to pair "No Bluetooth devices found"
Is there a laptop configuration I may have missed? Or do I have to 'unpair' the laptop::puck
Being extra careful in Windows10 Settings and Bluetooth connections
You did preface this task with may work . . . .
-
Mon 2017.08.07
@Gordon,
Thank you for the re-visit correction. My posting here was more to assist @user80065 as there were several posts and no 'experts' were responding. Just wanted to pass along that I had observed the same omission issue so that user wasn't pulling hair for no reason.Ctrl-click the reload button - that should force a full reload of the IDE
Verified that Ctrl-click did in fact load the new instance and the Relay Key edit entry field is now accessible. This should help user80065 if they follow the instructions in post #1 above.
Android device update: Acquired a Kindle Fire HD which runs sideloaded Android apps. Sadly, the relay app does execute there, but the Bluetooth only detects my laptop but is unable to discover the Puck. Am making the assumption that the Kindle is not good at BLE. Still working on smart phone acquisition.
-
I agree with you that in step #1 for the PC side that it is written
https://www.espruino.com/ide/
and that the 'Relay Key' edit field is not present there.Maybe @Frida is trying to imply that https://www.espruino.com/ide/relay/ is used on both ends perhaps, and that step #1 has 'improved' since five months ago?
Such that the relay link-app is used to pair the two, then use https://www.espruino.com/ide/ to access perhaps?
The input field is under Settings >> Communications>>Relay Key:: (Last Entry)
as Frida indicates.My outbound BLE device can't connect, so I am unable to test this idea on PC side.
-
I too am unable to locate the relay option under Communications using the Web+IDE version https://www.espruino.com/ide/
-
Sun 2017.08.05
@Gordon,
Could you perform a quick check for me please. Got the web-bluetooth-polyfill extention installed in chrome and configured the manifest.json file.When I got to step 2 after the install of BLEServer I get:
404 There isn't a GitHub Pages site here.
https://urish.github.io/web-bluetooth-secure-dfu/
Thank you,
Robin -
Thr 2017.08.03
The puck initially connects fine with the WEB IDE standalone but after a while it refuses to re-connect giving an error, "connection failure". Unpairing and pairing the puck again seems to always fix the problem
I too am having the same issue intermittently thrice a day over a ten hour period with the Native WebIDE. Not running anything other than LEDn.write() and setInterval()
This is with 1v88 and I haven't poked my nose into the console yet. A minor difference is that I don't always get the 'connection failure' error, just a locked app.
Windows 10.0.15063 on HP laptop with a Insignia BLE dongle. I'll update here should there be any earth shattering msgs.
Note: Also having left pane not updating issue as explained in http://forum.espruino.com/conversations/308441/
Also, I've only ever had to pair the Puck one time. Disconnect-Connect is needed, but never get the pairing dialog on subsequent tries. -
Thr 2017.08.03
Thank you @Gordon. Also had wondered if that might have been an issue. Ref wavelength:
It's possible the TX/RX pair you have are even using a different wavelength of light as well.
It does appear my detector is very directional. Will have to play some more.
-
Thr 2017.08.03
Thank you @Gordon for the clarification. That was the snippet I was using.
Puck.IR([500,500,500,500,500])
Now for the tough part. How to troubleshoot IR detection, when one is unable to see infrared output. Sorry, only born with super human strength and X-Ray vision.
Have an IR pair circuit with three inches separating the detector and emitter, as in a beam break circuit. When the beam is broken, a colored LED illuminates. This works as expected.
However, when I substitute the Puck for the emitter, [Puck visible LED side facing detector] there isn't any apparent detection.
ahhh ha!! . . . Forgot the old cell phone video mode trick. That device does make the IR LED transmission visible.
Wondering what the Puck IR emitter range is? In my circuit, I seem to need to be quite close. e.g. One inch. Are you able to point me to a spec sheet? Any experience with an expected transmission distance?
re: "I don't understand the question - do you have a link to where it says that?"
From page: http://www.espruino.com/Puck.js#ir-infrared
Fifth line below the heading "IR / Infrared"
"You can sometimes work this information . . . (a tutorial on this will be added soon)."
Re:
"The reference page mentions http://www.espruino.com/Puck.js+Infrared - which works."
Should your click event 'turn on a cheap IR lightbulb is' be different, than when clicked I get:
http://www.espruino.com/www.ebay.com/sch/i.html?_nkw=ir+rgb+light+bulb&_sacat=0
This is the link that is returned in the browser, which indicates 404
Should your link be working, I wonder if browser caching is partly a cause. I'm using Chrome Version 59.0.3071.115
or, . . . as we suspect here in the States that all web traffic is intercepted and stored in the massive Zettabyte storage site in Utah USA, https://en.wikipedia.org/wiki/Utah_Data_Center
and the returned link became corrupt from their tampering somehow.https://www.forensicmag.com/article/2013/09/data-storage-issues
"1 Zettabyte (ZB) – is equal to 1 billion Terabytes and represents approximately 36 million years of stored HD video. Recently it was reported that the National Security Agency facility located in Utah will be able to store 5 Zettabytes of information."'The truth is out there' . . . [fade to familiar sound byte] . . . . and . . . . . cut
-
Wed 2017.08.02
@user79451 have you considered a watchdog timer?
While this can be done easily with hardware, a software equivalent could be used. While I can't speak for whether this will work in your case, this implementation (non Espruino though) seems to be what you are after. When the watchdog function is not called, it triggers a separate event, such as a reset.
https://gist.github.com/rsbohn/1359687
Keep us posted on your success.
Robin -
Wed 2017.08.02
I wish to send a slow pulse train via the onboard IR diode, say [500ms on, 500ms off] repeat three times.
From page: http://www.espruino.com/Puck.js#ir-infrared
"IR / Infrared
To transmit an IR signal, you just need to call Puck.IR([...]) with an array of times in milliseconds. They alternate between the time the signal should be on and off - eg. [on, off, on, off, on, etc].
For example the command to turn on a cheap IR lightbulb is:"From page: http://www.espruino.com/Reference#l_Puck_IR
Parameters: 'data - An array of pulse lengths, in milliseconds'
The declaration is missing some detail.Q1: What is the range (width) in msec that each pulse may be? For instance min 0.5msec max 500msec
Q2: Does the array have to specify an exact count 'n' (on, off) cycles? For instance 'n' must equal 20
Q3: Does the tutorial at '(a tutorial on this will be added soon)' exist?
Sidebar:
The link at 'For example the command to turn on a cheap IR lightbulb is:' produces a 404 errorThank you for your input,
Robin -
Tue 2017.08.01
@Gordon, there doesn't appear to be any errors, just no output other than 'Connected >' in left pane:
From a fresh instance Native IDE
We have chrome.serial - not using 'serialport' module 'noble' module couldn't be loaded, no node.js Bluetooth Low Energy Error: LIBUSB_ERROR_NOT_SUPPORTED Disable Web Bluetooth as we have Winnus instead serial_audio: Audio Sample rate : 48000 serial_audio: Audio Serial Baud 9600 Bit time 5 Web Bluetooth available, but Windows Web Bluetooth is broken in <=56 - not using it GET chrome.storage.sync = {"AUTO_SAVE_CODE":true,"BAUD_RATE":"9600","BLOCKLY_EXTENSIONS":"|bluetooth|robot|","BLOCKLY_LANGUAGE":"en","BLOCKLY_TO_JS":false,"BOARD_JSON_URL":"http://www.espruino.com/json","CODE":"var on = false;\n\n//if(false){\nsetInterval(function() {\n on = !on;\n// LED1.write(on);\n// LED1.write(false);\n LED2.write(on);\n LED3.write(!on);\n}, 1500);\n//}\nvar c = function(){ clearInterval(); };\n\nvar f = function(){ LED1.write(0); LED2.write(0); LED3.write(0); };\n","COMPILATION":true,"COMPILATION_URL":"http://www.espruino.com:32766","ENABLE_Testing":false,"ENV_ON_CONNECT":true,"FONT_SIZE":12,"MINIFICATION_DeadCode":true,"MINIFICATION_LEVEL":"","MINIFICATION_Literal":true,"MINIFICATION_Mangle":true,"MINIFICATION_Unreachable":true,"MINIFICATION_Unused":true,"MODULE_AS_FUNCTION":false,"MODULE_EXTENSIONS":".min.js|.js","MODULE_MINIFICATION_LEVEL":"ESPRIMA","MODULE_URL":"http://www.espruino.com/modules","NPM_MODULES":false,"RESET_BEFORE_SEND":true,"SAVE_ON_SEND":0,"SERIAL_AUDIO":"0","SERIAL_TCPIP":"","SERIAL_THROTTLE_SEND":false,"SET_TIME_ON_WRITE":false,"SHOW_CODE_LINK_ICON":false,"SHOW_WEBCAM_ICON":0,"STORE_LINE_NUMBERS":true,"Sound_Error":"","Sound_Info":"","Sound_Success":"","Sound_Warning":"","Speak_Error":false,"Speak_Info":false,"Speak_Success":false,"Speak_Warning":false,"UI_MODE":"Normal"} Initialising SettingsConsole Initialising Utils Initialising Config Initialising Notifications Initialising Status Initialising App Initialising File Initialising Code Initialising Serial - Initialising Serial Chrome Serial - Initialising Serial Chrome Socket - Initialising Serial Windows NUS BLE - Initialising Serial Audio Initialising Terminal Initialising CodeWriter Initialising Modules Initialising Env Initialising Flasher Initialising EditorBlockly Initialising EditorJavaScript Initialising Send Initialising MenuPortSelector Initialising MenuSettings Initialising MenuFlasher Initialising SettingsAbout Initialising SettingsFlasher Initialising BoardJSON Initialising VersionChecker Initialising Compiler Initialising Assembler Initialising GetGitHub Initialising NPMModules Initialising ExamplePlugin Initialising Unicode Initialising SaveOnSend Initialising Minify Initialising Tutorial Initialising Webcam Initialising FontSize Initialising UiMode Initialising URLHandler Initialising CodeLink Initialising Project Initialising Testing Initialising Notification_Sound Initialising Tern Initialising Debugger Initialising Tour Initialising SettingsProfile Initialising HelpLinks Loaded code from storage. >>> Connecting... Set Slow Write = true Connected [object Object] Found a prompt... great! >>> Sending... ---> "\u0010console.log(\"<\",\"<<\",JSON.stringify(process.env),\">>\",\">\")\n" BT> Sending "\u0010console.log(\"<" BT> Sending "\",\"<<\",JSON.str" BT> Sending "ingify(process." BT> Sending "env),\">>\",\">\")\n" >>> Sent Got "< << {\"VERSION\":\"1v88\",\"BUILD_DATE\":\"Nov 10 2016\",\"BUILD_TIME\":\"11:53:15\",\"GIT_COMMIT\":\"b041fd452cfe48f488fcab77c602eb95a1cba528\",\"BOARD\":\"PUCKJS\",\"CHIP\":\"NRF52832\",\"CHIP_FAMILY\":\"NRF52\",\"FLASH\":524288,\"RAM\":65536,\"SERIAL\":\"3e9fc4de-e573d199\",\"CONSOLE\":\"Bluetooth\"} >> >\r\n>" Loading http://www.espruino.com/json/PUCKJS.json Device found (connectionId=undefined) [success] Connected to port ca:97:fc:73:b1:32 >>> Connected to port ca:97:fc:73:b1:32 Board JSON loaded Set Slow Write = true FIRMWARE: Current 1v88, Available 1v93 BT> Sending "3" BT> Sending "+" BT> Sending "4" BT> Sending "\r" BT> Sending "a" BT> Sending "s" BT> Sending "d" BT> Sending "f" BT> Sending "g" BT> Sending "\r"
Could port speed be an issue? I've tried 9600 default and boosted up to 115200 with no luck.
EDIT: Don't think so as it appears I am able to send code from right-hand pane. Keyboard presses don't seem to go to left-pane even after clicking in LH pane.
Will try again when I have a new Puck and the ability to flash via a smart phone.
-
Tue 2017.08.01
Thank you @Gordon.
I'll look into both options. Also will make friends with someone that may part with their device for a short while.
-
Tue 2017.08.01
@Gordon, Yes, the original Puck.js firmware 1v88
However not able to update http://forum.espruino.com/conversations/308440/#comment13773153
as I was waiting to see if there is the possibility.Tried all ideas of re-powering, re-connect, different button press duration combinations, re-launch and reboot, etc. Unfortunately, don't have a second Puck on hand at the moment.
Incidentally, I had read at least one occurrence of this roughly four months ago, but couldn't locate the post, and search was unsuccessful.
-
Mon 2017.07.31
I have installed the native Espruino IDE v65.9 on Windows 10. Have successfully paired. I am able to connect via Bluetooth and am able to see the green connected verification modeless popup dialog indicating the MAC address over the lower right hand corner.
The left hand panel shows "Connected >" and the flashing caret. But the Espruino banner never shows. Clicking in the left panel then immediately typing never updates, always a black screen, but it can be verified from Settings>>Console that typed characters are being recognized.
Can send code snippets from the right hand side along with Blocky examples, but the left hand panel never updates. LEDs flash on Puck so code is executing there.
Have tested Com port mode and am able to connect to a Pico. Left hand panel accessible.
Is this related to the version of Puck firmware or is the native Espruino IDE under Bluetooth suspect? -
Mon 2017.07.31
While I have had successful re-flash sessions of Pico and ESP8266, this is a first for the Puck.
I have read over and reviewed the video at: http://www.espruino.com/Puck.js#via-nrf-toolbox-app-android-ios- and note that flashing is accomplished using a Bluetooth smart-phone and instructions for other means are absent.
Although the native Espruino IDE doesn't explicitly indicate that updating is not possible, I did attempt without success.
Is it possible to update Puck firmware on Windows 10 without the use of a Bluetooth smart-phone? (or am I SOL)
My guess is that it is not possible, based on the documentation present."It is the answers, not the questions, that are embarrassing." Helen Suzman
-
Thought that the gist ref #16 of just having one WiFi instance and using a server might replace what you had intended.
Do any of these spark some ideas?
http://www.espruino.com/Pico+Weather+Station
http://www.espruino.com/wifi_humidity
http://www.espruino.com/WiFi+Enabled+Thermometer
from:
http://www.espruino.com/TutorialsWhy not call each of your modules from inside the 'connected' function once connected?
This would remove the need to 'pass' the concept of connected to each individual module, as each is only called once 'inside' the on-connected function. Ref Weather Station example above
-
Mon 2017.07.24
Thank you for posting your snippet. I see what you are doing with multiple connect objects, but I'm struggling as to why the need for several.
I struggled with the different modules myself, but was able to use just one instance of the WiFi object.
Although this is not a solution to what you are after, please read over this to see if it sparks some ideas.
'STA or AP mode browser unable to connect to ESP8266-12'
http://forum.espruino.com/conversations/300549/The overall gist is to create a server/station object using the WiFi class module.
I'm still searching for some code snippets to see if we are able to use a different class object rather than Wifi to accomplish what you are after.
-
Mon 2017.07.24
@Polypod, have you solved the original removeListener() mystery or is there some doubt in the resolution you have settled with?
While It is true that a listener can be connected to most objects as you so astutely described, after reading the online reference, I agree with @Wilberforce that it appears the WiFi connected object was meant to have a single listener.
Polypod, if you are still wondering if you are at a sutiable solution, please post the entire code module as it now stands. This may provide
others with clues that then could provide some insight. We all understand that you are taking a stab at a rather complex event model. I myself have had to post unfinished-unpolished intermediate segments and felt a bit uncomfortable waiting to arrive at a solution."It is the answers, not the questions, that are embarrassing." Helen Suzman
To those that are following along, is anyone able to post an example with multiple listeners or reference an online tutorial?
-
Sat 2017.07.22
Welcome @user79576 I'm glad you have found enjoyment with the Espruino interpreter.
Although I haven't tried out a fix to your particular issue, I believe the solution is to place the removeListener() function outside your creation of function f() as shown in the online reference:
http://www.espruino.com/Reference#l_Object_removeListener
As the var f is assigned the object result of the function creation, 'connected1' is output as expected, then function f() is created again, 'connected2' is output as expected then the object f() is removed. My guess is that processing is halting at this step as memory is corrupt, and the rest of the statements are ignored as you are seeing.
Also, try:
wifi.removeListener("connected",f);
Other detail
http://www.espruino.com/Reference#Wifi
http://www.espruino.com/Reference#l_Wifi_connected -
Fri 2017.06.02
Thank you @allObjects for the simple response on dual power.
As there appears that re-editing seems to plague this thread, [me included ;-) ] isn't there a missing 'not' or 'never' in the sentence 'This is the reason that . . . ' and a missing closing ')' found in (#24) ?
@Gordon thank you for the clearing that up. I missed (what the device did\was) the 'LM3671' reference in post #22 and your similar responses to those posed by my suggested clarification. I felt it made more sense to ask explicitly so as to tie in with the documentation that appeared to have missing detail. I'm sure that the topic re-visit will help @trusktr and assist @Thinkscape and others as it has me.
Maybe there is a simple way to show how to connect, which pins to connect to, using the three power input choices in table format, perhaps? Bi-Directional [ J2-3 ] gave me fits until I studied the schematic, as the docs currently state it is an output pin.
-
Thr 2017.06.01
From #14
Thank you @allObjects for the datasheets and detailed analysis.From #21
@trusktr after consideration of your project requirements, the suggestion that Gordon made of using a USB power pack makes more sense for the demo, my suggestion for the power adaptor (I use a Kindle charger) should you have one lying around or for long term power on requirementsFrom #19
Just to confirm, this is to the 3.3v pin (which the schematic calls "3.3v output"), NOT the VUSB pin?
As @trusktr had the same question, would @Gordon please expound on the following to add clarification for us all:
It is given that: (links found in #2 above)
- The schematic at github shows that there is a VBUS [ J2-2 ] and a VUSB
- The regulator shows an input of 5v but isn't clear on it's origin (after Fuse F1 perhaps)
- EspruinoWiFi documentation explains that the 3.3v pin [ J2-3 ] is an output
- There is a stern warning not to connect VBUS [ J2-2 ] when the micro USB connector is attached
Q1: Was this distinction VBUS vs VUSB made for schematic software reasons and not a typo?
Q2: What/Where is the connector showing VUSB/DM/DP or is this the input to the WiFi module?
Q3: Under the assumption the micro USB connector is feeding the power, is it true that VBUS [ J2-2 ] is available as an output and that it is electrically connected to the input (after Fuse F1 perhaps) of the regulator as 5v (the source a USB port supplies), and therefore also supplying 3.3v as VDD [ J2-3 ] as an output?
Q4: Under the assumption that supplemental power from a 3.3v battery is supplied, and that no micro USB connector is attached, that is could be applied as an input VDD at [ J2-3 ] bypassing the onboard regulator?
Note: This would mean there is no fuse protection and that input voltage would not be detectable at PA9/P30Q5: Similarly as above, upto 5v could be supplied by a regulated supply to VBUS [ J2-2 ], thus using the onboard voltage regulator, producing the 3.3v to the rest of the circuitry, and at VDD [ J2-3 ] as an output?
Thank you Gordon
- The schematic at github shows that there is a VBUS [ J2-2 ] and a VUSB
-
Wed 2017.05.31
This code fiddle popped up in a separate forum that may provide a shortcut in program development time. https://benjaminbenben.com/espruino-pixels/ @benjaminbenben
from: (#11) http://forum.espruino.com/conversations/305442/#comment13656647
Would love to get an update on your project success @OwenBrotherwood
-
@trusktr are you dead set on battery power at this time, e.g. are you really at the development stage and will be writing code for the near future? If so, I would consider @Gordon suggestion of a dedicated supply to avoid the hassles with battery use. You will be thankful, we know this based on experience. Have you considered using a cell phone charger? I run my Espruino projects using a leftover 5v 800ma cell phone charger with a micro USB plug on the end, which I plug into a micro USB receptacle whose pins fit nicely into the solderless breadboard. Mine has been running non-stop for three months now for just pennies to the all mighty power company. My 0.02 worth.
EDIT:
I make this suggestion as the picture above (#13) shows the battery with a rating of 600mAhr Running WiFi continuously, say 300ma, will only provide a max of two hours of use. Much less with other attached devices, and remember actual mileage will vary. . . .
Tue 2017.08.08
Running 1v91 on Pico
Trying to get Pico to start executing in stand alone mode without the WebIDE connected at power up.
Attempting to create a tutorial with tons of embedded console.log() comments to allow viewer to easily follow along.
Works great when WebIDE is connected via USB cable. Trying to do this stand alone.
Have tried combinations of setTimeout(), onInit() and E.on( 'init', but code execution just doesn't start.
Exact issue as in:
http://forum.espruino.com/conversations/270412/#comment12787458
but that was back in June 2015, my guess is that updates since then should be in place.
Also referenced:
http://forum.espruino.com/conversations/295607/#comment13311361
Any ideas, example or tutorial perhaps? Thanks in advance.
Robin
UPDATE: Tried USB.setConsole() as suggested at:
http://www.espruino.com/Troubleshooting#console
also, only LEDs connected to GPIO pins nothing fancy.