-
-
cool, thank you, it is working now ;)
I wanted to control different functions just by one button by short and long presses,
I need a time to understand construction of programming language you use for espruino,
now sometimes it remain me arduino way and sometimes python,
should I learn more python to understand espruino programming way better? or in espruino are some special ways to use some functions which are not simply same as those functions wrote in strict python? -
-
Hi, I was trying to set led to turn it on or off depends of how long I press the button, I used your code above.
my codesetWatch(function(e){ var isLong = (e.time-e.lastTime)>0.4; print(isLong.toString()); onD23(); // ... }, BTN, {repeat:true, debounce:50, edge:"falling"}); setWatch(function(e){ var isLong = (e.time-e.lastTime)>0.4; print(isLong.toString()); offD23(); // ... }, BTN, {repeat:false, debounce:50, edge:"falling"}); function onD23(){ digitalWrite(D23,1); setTimeout(function () { digitalWrite(D23,0); }, 1000); } function offD23(){ digitalWrite(D23,0); setTimeout(function () { digitalWrite(D23,1); }, 1000); }
but I have same sequence on the board, when press the button my LED(D23) is ON for a 1000ms and then off, so when I press button short or long time not change nothing
-
-
Yes I did try to choose both pins from both ports (I2C1 and I2C2) from my maple leaflabs,
I put there scl: D5, sda: D9 - for I2C1 and scl: D29, sda: D30 for I2C2 option.
Also tried to mark them that way scl: PB6, sda: PB7 and for I2c2 port, scl: PB10, sda: PB11.
but still got this errorWARNING: Expecting a number or something iterable, got undefined WARNING: Expecting a number or something iterable, got undefined =undefined WARNING: Expecting a number or something iterable, got undefined WARNING: Expecting a number or something iterable, got undefined Reading: 0
-
I've got that error when wanted to upload it into board
WARNING: Expecting a number or something iterable, got undefined WARNING: Expecting a number or something iterable, got undefined =undefined Uncaught InternalError: Timeout on I2C Write Transmit Mode 2 at line 2 col 55 this.i2c.writeTo(this.addr, reg, value>>8, value); ^ in function "writeRegister" called from line 15 col 52 this.writeRegister(REG.POINTER_CONFIG, config); ^ in function "getADC" called from line 3 col 6 }); ^
-
-
-
-
-
hi are there any portion of information or code about espruino time settings what would be visible in console? I mean like you can see date, time, seconds etc.? was trying to use commands from http://www.espruino.com/Reference reference section but unsuccessful
I could see from this eg. http://www.espruino.com/Pico+Clock#line=3,11 date (Thu Jan 1 1970 00:09:57 GMT+0000),
but couldn't set new date and time -
-
-
cool, I had some counting problem when disconnected and connected board again, everything was working till I didn't use "save()" command and turned board off and back on, or disconnected and connected again, will check how it is going on now ;)
fdufnews - everything is workin now, even after power of and on again the board,
very helpful ;) -
-
do you know how to use this for loop similar to way like Arduino ?
eg.for(int i=0 ; i<10 ; i++){ digitalWrite(13, HIGH); delay(500); digitalWrite(13, LOW); delay(500); }
I was trying to use tutorial from buttons example, and change it a bit, like when I press the button LED1 will blink let say twice or triple times, in arduino modification it is easy, how to do it in espruino?
-
Thank you for your effort, I am beginner with espruino and python, so don't understand much of your code, a bit better doing that with C, I mean it is more easy to me how to place the parts of the code and implement libraries, here for now it is a bit of cosmos to me
Is there any tutorial to show how to implement new modules, libraries, and place code properly in Web IDE?
-
Hi, I would like to use ADS1115 module with espruino, it is working by I2C, under arduino is nice library
https://github.com/adafruit/Adafruit_ADS1X15 ,
I was trying this library to work with stm32 maple leaflabs R3+ and it was working with it well.
I wonder how to use this module with espruino?
Any chance you could help me to solve it? -
-
-
this time got this error
*Uncaught Error: Field or method "createArrayBuffer" does not already exist, and can't create it on undefined at line 1 col 16 {var d=Graphics.createArrayBuffer(128,64,1,{vertical_byte:!0... ^ in function "connect" called from line 1 col 47 var g = require("SSD1306").connect(I2C1, start);*
-
Hi I am new here so want to say hello first ;)
I was trying to use code from here http://www.espruino.com/SSD1306 but got that error when was trying to program my Maple Leaflabs R3+.
function start(){ :g.drawString("dafa",2,2); :g.flip(); :} =undefined >I2C1.setup({scl:B6,sda:B7}); =undefined >var g = require("SSD1306").connect(I2C1, start); ERROR: Unable to mount SD card : NOT_READY WARNING: Module "SSD1306" not found =undefined Uncaught Error: Field or method "connect" does not already exist, and can't create it on undefined at line 1 col 27 var g = require("SSD1306").connect(I2C1, start); ^ >
is something missing in my picocom or Espruino Web IDE?
I tried to run my oled under both, same error
but I have I2C adapter for HD44780, should I connect 3 pin to GND as well?