Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Connect.txt
- Committer:
- jbrouwer
- Date:
- 2016-11-01
- Revision:
- 2:5de7be1a34dc
File content as of revision 2:5de7be1a34dc:
% THIS IS A M FILE % SPECIFY SERIAL PORT. On windows this is COM1, COM2... % List serial ports; this=instrhwinfo('serial'); % this.AvailableSerialPorts clear all; delete(instrfindall) % this closes the previous connection. PORT = '/dev/cu.usbmodem1412'; s = serial(PORT); set(s, 'BAUDRATE', 115200); set(s, 'TERMINATOR', 'CR/LF'); fopen(s); while 1 line = fgetl(s); pulses_in = str2num(line); send_data = Controller(pulses_in,0); fprintf(s,strcat(num2str(send_data), '\r\n')); end