I had a switchto switch on/off setConsole on USB or on an other Serial I use print non console.log
print
console.log
i've tried this
let laser; function lis(){ let somme=0; var dist = laser.performSingleMeasurement().distance; print(dist); //console.log(dist); //console.log("distance: ",dist," lissée:",somme/table.length); analogWrite(LED1, (1000-dist)/1000, { soft:true, freq:200 }); } function onInit() { //Serial1.setup(115200); I2C2.setup({sda:B3,scl:B10}); laser = require("VL53L1X").connect(I2C2); print("init"); digitalWrite(B4,1); // set XSDN -> turn the sensor on setInterval(lis, 150); pinMode(A6, 'input_pulldown'); setWatch( function (e) { console.log(e.state); if (e.state) { Serial1.setConsole(); } else { USB.setConsole(true); } }, A6, { repeat:true, edge:"both", debounce: 100 }); }
if i move the console to another Serial... nothing come in Processing otherwise my output is always crippy
> [J1587
1587 is my number
1587
:v
Any idea
@Mrbbp started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I had a switchto switch on/off setConsole on USB or on an other Serial
I use
print
nonconsole.log
i've tried this
if i move the console to another Serial...
nothing come in Processing
otherwise my output is always crippy
1587
is my number:v
Any idea