Walkthrough - Making your first construct (DC Motors)
This tutorial will walk you through creating your first construct. We highly recommend that you take a look at the Sharing Robots Tour first if you have not done so yet.
Providing you are setup correctly, the tutorial should take you less than 15 minutes to create a construct that lets you and other web users control one or more DC motors. All without any computer programming.
You can either use your real devices or the built-in virtual devices for the walkthrough (see Glossary for explanation).
The tutorial will ask you to do the steps and then explain what you've done later. It's actually easier to do it than to tell you how to do it.
The basic steps of making a construct are:
Step 1: Create The New Construct and Establish Contact
Step 2: Choose a Control Panel
Step 3: Add new Actions
Step 4: Assign Actions to Buttons
Step 5: Preview your Construct
Step 6: Share with the world
Check that you have setup correctly and let's begin!
Step 1: Establish Contact - Link up your MakeAffinity client to the MakeAffinity website
You need to do this step just once for each new construct that you create.
At your MakeAffinity client:
a) Look for your Client Endpoint and Client Key. You will be copying them in the next section.
A Client Endpoint looks like this: fly.gateway.2wire.net:21000
A Client Key looks like this: C03C59E00B412F6D
At the website:
a) Create a new construct project:
Go to: Make -> Create New Construct
Type in a name in the Name box and click the Create button.
The system may ask you to enter a different name if what you entered is already used by another user.
The web page will now show your newly created construct in your list of constructs.
b) Enter your connection details:
From the list, select the construct that you have just created by clicking on Select.
Click on the Settings tab.
Copy or type in the client endpoint of your client to the website's Master Client Endpoint box.
Copy or type in the client key of your client to the website's Client Key box.
Click Save All at the bottom of the page.
The website can now communicate with your client.
|
Tip: MakeAffinity Client - The basics
The 'All Stop' button on the MakeAffinity Client will stop all device activity.
|
|
Tip: Making Constructs - The basics
Each construct consists of a control panel, the buttons of the control panel, and the actions that each button will trigger. Therefore, the typical steps for making a construct is to choose a control panel to use, specify the actions, and assign the actions to the buttons.
|
|
Tip: About the Action Editor (Make -> Actions tab)
The Action Editor will retrieve and display your supported devices. Creating a new action is simply a matter of choosing a device from the list of devices, setting the device's action properties, testing the action, giving the action a name, and saving the action. The following steps will show you how simple this is done.
|
|
Tip: About Motor Devices
A motor device may control 1 or more motors. Each motor is identified by its number. The main action properties of a motor device are the motor's number, the direction you want the motor to turn, and the velocity and acceleration of the motor's motion. Set these properties to create a motor action. The following steps will show you how.
|
Step 2: Choose a control panel
At the website:
a) Choose a control panel for this construct:
Click on the Control Panel tab.
At Use the following control panel for this construct, choose MotorTutorial.
Step 3: Add Actions
At the website:
a) Add an action that spins a motor forward:
Click on the Actions tab.
Click on the Add Action button.
Click on the Show My Devices button to show the Add Action dialog box.
Click on the Device dropdownlist and choose your motor device.
In the action's properties, choose a motor by its number (Motor No.).
Set its Direction to forward, Velocity to 50, and Acceleration to 50.
Test the action by clicking the Test button and you should see your motor move.
Click the All Stop button on the MakeAffinity Client to turn the motor off.
Enter an Action Name (e.g. 'MotorForward'), and click the Add button.
You will now see your new action listed on the Actions tab.
Let's now add an action that stops the motor.
b) Add an action that stops your motor, the steps are identical:
Click on Add Action -> Show My Devices.
Click on the Device dropdownlist and choose the same motor device.
In the action's properties, choose the same motor number (Motor No.) and set its Velocity to 0.
Enter an Action Name (e.g. 'MotorStop'), and click the Add button.
You will now see your new action listed on the Actions tab.
c) At the Actions tab, you can test your actions directly from the actions list by clicking on Test.
Step 4: Assign Actions to Buttons
At the website:
a) Assign your actions to the buttons of the control panel:
Click on the Buttons tab.
Click on the Add Button Command button to display the Add Command dialog box.
Using the Button and Action dropdownlists, pair up your actions to your buttons and click Add.
Step 5: Preview your construct
At the website:
a) Now to see the final product:
Click on the Preview tab.
Click Start Preview to start playing with your construct.
Step 6: Share with the world (Optional)
At the website:
a) Let other web users play your construct:
Click on the Settings tab.
Tick the Go Live! checkbox.
Click on Save All at the bottom of the Settings page.
Go to the MakeAffinity home page and click on Browse to search for your construct.
Click on it, book a time slot, and view it.
Ask your friends to use it from wherever they are too!
Add a web cam to your construct so others can see what they're doing! Here's how.
You are very much encouraged to try out other settings. The meanings of all settings can be found at the Glossary
End of tutorial