Skip to content

Latest commit

 

History

History
executable file
·
41 lines (27 loc) · 2.04 KB

exercise5.md

File metadata and controls

executable file
·
41 lines (27 loc) · 2.04 KB

Exercise 5: Gather the Training Data

If you are on Mac or Windows you and have trouble copying the data from the serial output. There is a very short video here that shows how you can do it!

Alternatively, you can use the terminal and pbcopy the ouput. ENSURE SERIAL MONITOR IS CLOSED BEFORE DOING THIS. The actual port name will likely be different on your computer. If necessary, get the name of the port from the Arduino IDE. We're using /dev/cu.usbmodem214101 as an example.

pbcopy /dev/cu.usbmodem214101 

This will save the output to your clipboard, and you can paste it into your desired file from there! Unfortunately, you won't see the output from the serial monitor using this method.

Alternatively, you can use cat to view the output and copy + paste it as you please:

cat /dev/cu.usbmodem214101 

Otherwise, you can follow along with the instructions as normal:

  1. Press the reset button on the board
  2. Open the Serial Monitor: Tools -> Serial Monitor
  3. Make a punch gesture with the board in your hand - you should see the sensor data log in the Serial Monitor
  4. Repeat the gesture 10 (or more) times to gather addition data
  5. Copy and paste the data from the serial output to new text file named punch.csv
  6. Close the Serial Monitor
  7. Press the reset button on the board
  8. Open the Serial Monitor: Tools -> Serial Monitor
  9. Make a flex gesture with the board in your hand
  10. Repeat the flex gesture at least 10 times
  11. Copy and paste the serial output to new text file named flex.csv

screenshot of serial monitor with IMU data

Creating CSV Files

Visual Studio Code, Sublime Text, or Atom will all work great for creating CSV files. If you don't have one of these editors installed, try Notepad.exe on Windows or TextEdit on MacOS. Note that TextEdit wants to save data in rich text format default. Be sure to choose Format -> Make Plain Text before choosing File -> Save.

Next Exercise 6: Machine Learning