connecting a pico to a computer and Processing.org with serial #1077
Replies: 7 comments
-
Posted at 2022-03-11 by @fanoush In my opinion console is for entering commands and logging errors, data like this can better go directly to the right Serial object while the real console is switched away - that would give you clean output without any surprises. see also http://www.espruino.com/Reference#Serial - methods print,println,write USB port serial is |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-03-11 by Mrbbp USB object is an instance of Serial There is no exemple! to initiate the USB have you one? should i use this?
Or regards é. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-03-11 by @fanoush there is no need to initialize Of course after running this you cannot connect over USB via Espruino IDE, this is for final state when the project runs as designed. However you can make this conditional on something (button or some other pin high/low). Also I think when you hold button while inserting pico to USB it may avoid starting your code at all so that can be the way to connect IDE and change stuff |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-03-11 by Mrbbp I had a switchto switch on/off setConsole on USB or on an other Serial i've tried this
if i move the console to another Serial...
:v Any idea |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-03-11 by @fanoush print is basically same as console.log both write to console |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-03-15 by @gfwilliams
These write to the console, but they also have to add extra chars to remove the If you want to write direct, use |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-03-15 by Mrbbp @gordon Thanks regards |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-03-10 by Mrbbp
I know this certainly a stupid question.
i'm prototyping something for my students
i use a V53L1X connected to my pico.
i would like to transfer the datas to Processing.
i connect the Pico on the usb plug.
should i use
console.log
orprint
to transmit my data?
should i initialize a serial port?
Serial1.setup(115200);
some time the console send error from the program (i2c init);
i'm really confuse, it should be simple, but it's not.
sometime nothing arrive to Processing.
i've got an other problem, the string received start with an invisible char and
[J
How should i do to have a clean string with distance value?
Could i use midi thru usb to send datas?
i should split my value [0-4000] in 2 set of 7bits (midi value)
thanks for your help
éric
and the processing sketch
Beta Was this translation helpful? Give feedback.
All reactions