-
DrAzzy, I added the function as you suggested. I then unplugged the board from the USB port and plugged the board back into the USB port, but the code does not seem to execute upon startup. My new code is:
var phValue=""; Serial4.setup(38400); //Serial1.setup(9600/*baud*/); Serial4.onData(function (e) { phValue+=e.data; if (e.data == "\r") { print(phValue); phValue=""; } }); function getPhValue() { on = !on; digitalWrite(LED1, on); Serial4.print("r\r"); } function onInit() { var interval = setInterval(getPhValue, 1500); }
-
-
When I type save() I receive:
=undefined Erasing Flash..................... Programming 36000 Bytes....................................... Checking... Done! >ERROR: Invalid baud rate specified
I am curious as to what ERROR: Invalid baud rate specified
refers too.I disconnect then close the Espruino WebIDE window. Next, I open the WebIDE, connect and type dump(). dump returns:
var phValue = ""; function getPhValue() { on = !on; digitalWrite(LED1, on); Serial4.print("r\r"); } var interval = 1; var on = false; setInterval(getPhValue, 15360000); Serial4.onData(function (e) { phValue+=e.data; if (e.data == "\r") { print(phValue); phValue=""; } }); =undefined
My JS code seems to have saved correctly, but the code will not execute upon a save() or when I unplug and plug the Espruino board into the same USB port to obtain power. I also tried pressing the reset button, but that does not seem to reset the board. The only change I see when pressing the RESET button is, the WebIDE locks up causing me to have to unplug the Espruino board from the USB port, then plug the board into a different USB port in-order for the WebIDE to recognize the Espruino board again.
Pressing the Send to Espruino button works as expected; however, as I stated above, submitting save() does not work as expected. What should I do to get the saved code to work?
-
-
-
I was considering the HY board, but I think the LCD will be a little over kill for my current project. I was planning on using 3 rows of 4 7segment LEDs to output my sensor data; also create a GUI with node-webkit for the computer to also output the real-time sensor data. The discovery board looked the most appealing because of its 6 uart ports. Two of my sensors use uart to communicate and the wifi(wifly) module also uses uart to communicate. Leaving 3 extra uart ports open to use in the future for possible upgrades. Since SD does not currently work for the discovery board I will opt to wait for the Espruino board to become available and use a uart multiplexer to extend the available uart ports the Espruino board provides.
I'm located in the USA so who ever is located in the US will work ;-)
-
Hi Gordon. Thanks for your response. I was considering purchasing a STM32 F4 Discovery board while waiting for the Espruino to become readily available. The Discovery board does not have a SD Card slot, but if I purchased a SD modular from a distributor will .readFile() work?
One more question, do you have an estimate about when distributors will start carrying Espruino boards?
-
As simple as JavaScript can be, I guess there still is a little bit of a learning curve :-)
I called onInit() at the bottom of my script and it now works as expected :-)