The problem is that currently in te serial monitor we can read the values the ones next to the others and when I use serialread function in SciLAB I have no control on what is read. The way to exchange data with the serial communication is the following: - Open serial communication - Read/write on the serial communication - Close the. "data" is a string that I convert in float to store it in an array for plotting. ![]() Here I open the port COM5 and I read 3 characters in the serial monitor. In SciLAB, I use the "Serial port communication" library that contain the following functions : This is the basic code written by Paul Badger for a capacitive sensor in CapSense Library. Serial.print(total1) // print sensor output 1ĭelay(100) // arbitrary delay to limit data to serial port Long total1 = cs_4_2.capacitiveSensor(30) Thanks for being here and for responding at such short notice.ĬapacitiveSensor cs_4_2 = CapacitiveSensor(4,2) // 10M resistor between pins 4 & 2, pin 2 is sensor pin, add a wire and or foil if desiredĬs_4_2.set_CS_AutocaL_Millis(0xFFFFFFFF) // turn off autocalibrate on channel 1 - just as an example
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |