MegunoLink can play back the content of a text file as though it was being received by a serial port. You can record messages sent from your Arduino with the log to file visualizer then replay the log. This can be useful for creating demos of the interface when the hardware isn’t readily available.

To setup a file source connection:

  1. Open a connection manager visualizer
  2. Choose File from the Add Connection drop-down menu
  3. Select the file that the connection will play back
Add a file connection

Create a new file source by selecting File from the Add Connection menu.

MegunoLink will create a configuration panel for the new fileconnection:

File configuration panel

File source configuration panel

The title box lets you give the connection a name. This is useful to keep track when you have multiple connections. The name you enter here will be displayed on the connect button shown in visualizers.

Use the browse button to select a file. The path can be absolute or relative to the MegunoLink project file. Right-click on the file-path to change between the two options.

Click the Connect button to open the connection and begin receiving data. Drag the slider back and forth to change the playback position in the file. Click the rewind button (rewind button) to resume playback from the start of the file.

You can control the playback rate from the File Source Configuration dialog. Click the Advanced button to show the configuration window. Increase the data rate to play the file faster; decrease it to slow down playback. When the Loop box is checked, the file will restart playback automatically when MegunoLink reaches the end of the file.

If you check the Start when project loads box, the source will start playback as soon as the project is loaded into MegunoLink.

File source configuration dialog

The data playback rate and behaviour can be changed using the File Source Configuration dialog

Start typing and press Enter to search