Skip to content
stuartallen edited this page Jun 10, 2021 · 10 revisions

An intrdoction to Loom

Summary

This document exists as an introduction to what the Loom device is. I would suggest reading this whole document if you are beginning development, but it is designed to be read quickly to save you time. The idea is to be a living document that developers can add to all the time in order to make the beginning phases of development easier. I (Stuart Allen) am the original author, and my URSA project was closely focused on Loom4Max, and thus most of the information here initially will focus on this project and URSA. However, the scope of the Loom is wide and there are many projects.

What is the Loom?

The Loom is an arduino device, typically capable of sending information over some sort of wireless communication. For Loom4Max this channel is a wifi network. The following is a visual representation of the Loom’s communication in Loom4Max projects:

Loom diagram

In this project the Loom has sensors and actuators (things like motors). A JSON file containing sensor data and other information is constantly sent to computers connected to the same Wi-Fi network. These files are visible through MaxMSP, which uses javascript under the hood. MaxMSP can also send JSON files back to the device that act as commands for the actuators.

What should my first steps be?

Bookmark the OPENsLab-OSU/Loom github and follow the quick start guide. If you are developing for Loom4Max also bookmark the Loom4Max github and follow the installation guide. Ask Dr. Udell to make you a developer if you would like to make changes to the code here. If you are a Loom4Max developer see the section under this to create an example.

Also please join the Loom Support Group discord here. This is a place where you and other students can discuss tips, ideas, and issues. Ask Dr. Udell to make you a Loom-Developer to have special permissions like editing the rules channel.

How do I upload code to the device?

If you are a Loom4Max developer follow along with this example (download all these files, move them into your arduino folder, and open them in the arduino ide). Connect your Loom to your laptop and select the correct board type under tools->Board:->Loom SAMD Boards->loomified feather M0. Then reset the device by pressing the reset button near the usb port. If it is between two boards like on the Wattson, use an object like a guitar pick to reach between. DO NOT USE SOMETHING METAL. You can pull them apart and use your finger, but this method is much faster. Then select the correct port, the port number will likely have decreased. Then hit the upload button. You will have to reset the device whenever you upload code.

Troubleshooting Techniques to Know

This is not a comprehensive list, but a list of some debugging techniques that you might not know off the top of your head. Use a mixture of these and common sense.

  • Use the serial monitor in the arduino ide (top right question mark icon) in order to see updates from the device.
  • Use “Loom.begin_serial(true)” to have the device wait till you open the serial monitor to start its script. This is crucial to view startup activity.
  • When struggling to view a Loom device in AP mode:
  • Press the "Send IP" button on the module core.
  • Change the instance number on the module core, then change it back.
  • Delete the current module core and generate another one from the patch generator.
  • Turn off your Loom and turn off wifi on your computer. Turn both back on and try again. Try steps 1-3 again.
  • (Windows only) Check if the Loom wifi is listed as private. To do this connect to the Loom's network then look under properties and select "private". > * If you are going to connect your Loom to your home network, make sure that is private as well.
  • Take a break and try again later.

URSA Specific Suggestions

Start the “getting the most out of academic research” assignment as early as you can. There are some very helpful resources and tips in this video. Each week you will have a meeting with Dr. Udell. Come to the meeting with the following items: What did you do this week? What (if any) problems did you encounter? Do you have a plan to get around them or do you need help? What do you plan to do next week? WRITE THESE THINGS DOWN SOMEWHERE. Dr. Udell is very busy and can’t remember these things for you. Respect your time and his by being responsible for your research.

Terms to know

  • AP mode - This means the device has its own wifi network. One of the wifi modes.
  • Client mode - This means the device is connected to a different wifi network. You should aim to use this mode most of the time, as the start up is much faster and reliable. One of the wifi modes.
  • Wattson - The Wattson is a loom device that has two analog sensor inputs, one sensor output, and one button.
  • Stepper - The stepper device is the larger of the Loom devices with motors. This motor can move forward and backward beyond 360 degrees. DO NOT PLUG INTO THE WALL AND VIA USB.
  • Servo - The servo device is the smaller of the Loom devices with motors. The motors have a limited range, but multiple can be attached to the device. DO NOT PLUG INTO THE WALL AND VIA USB.
  • Relay - The relay is a loom device that allows power to pass based on commands it is given. DO NOT PLUG INTO THE WALL AND VIA USB.