<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://trcnet.asuscomm.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=General_Principles</id>
	<title>General Principles - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://trcnet.asuscomm.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=General_Principles"/>
	<link rel="alternate" type="text/html" href="http://trcnet.asuscomm.com/mediawiki/index.php?title=General_Principles&amp;action=history"/>
	<updated>2026-05-14T23:16:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>http://trcnet.asuscomm.com/mediawiki/index.php?title=General_Principles&amp;diff=444&amp;oldid=prev</id>
		<title>Mikets at 05:17, 6 May 2024</title>
		<link rel="alternate" type="text/html" href="http://trcnet.asuscomm.com/mediawiki/index.php?title=General_Principles&amp;diff=444&amp;oldid=prev"/>
		<updated>2024-05-06T05:17:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:17, 5 May 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This section describes general practices of designing, building and debugging the robot. These practices may involve multiple disciplines. Students are highly encouraged to learn multiple disciplines because when the robot ''does not work'', you have no idea if the problem is ''mechanical'', ''electrical'' or ''programming''. Knowing just one discipline will render you handicapped in debugging the root cause. For example, the most common problem is: ''a subsystem does not respond to control''. A programmer may try for hours looking into the code trying to figure out why the code is not controlling the mechanism. But in reality, the cause could be as simple as the motor was unplugged. Therefore, when something is not working, one needs to understand how the mechanism works in the big picture involving both mechanically, electrically and programmatically. The most useful debugging technique is ''divide and conquer''. To apply this technique, you need to understand how the mechanism works in the complete picture.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This section describes general practices of designing, building and debugging the robot. These practices may involve multiple disciplines. Students are highly encouraged to learn multiple disciplines because when the robot ''does not work'', you have no idea if the problem is ''mechanical'', ''electrical'' or ''programming''. Knowing just one discipline will render you handicapped in debugging the root cause. For example, the most common problem is: ''a subsystem does not respond to control''. A programmer may try for hours looking into the code trying to figure out why the code is not controlling the mechanism. But in reality, the cause could be as simple as the motor was unplugged. Therefore, when something is not working, one needs to understand how the mechanism works in the big picture involving both mechanically, electrically and programmatically. The most useful debugging technique is ''divide and conquer''. To apply this technique, you need to understand how the mechanism works in the complete picture.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Code reading &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/del&gt;gamepad controls.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Code reading gamepad controls.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Code sending &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/del&gt;gamepad &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;value &lt;/del&gt;to &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/del&gt;robot controller.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Code sending gamepad &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;values &lt;/ins&gt;to robot controller.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Robot controller sending control signals to &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/del&gt;motor controller.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Robot controller sending control signals to motor controller.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Motor controller sending electricity to the motor.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Motor controller sending electricity to the motor.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Motor moving the mechanism.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Motor moving the mechanism.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;With this complete picture, you can pick a point where you can easily figure out if the control successfully reached that point. For example, point 3 above was about the robot controller sending control signals to the motor controller. Ask yourself this question: ''how can you tell if the motor controller received signal from the robot controller?'' For a TalonSRX motor controller used in FRC, one can tell by looking at the LED light on the controller. If the motor controller received a ''forward'' signal, it should flash green. If it received ''reverse'' signal, it should flash red. If this is indeed the case, you can rule out problems from point 1 to point 3. Therefore, the problem is not in the code. If the motor controller does not have status light (e.g. FTC motor controllers), you may pick point 4. Then, the question is: ''how can you tell if the motor controller is sending electricity to the motor?'' You can easily prove that by getting a known good motor and plug it in to the motor controller and see if the code will spin the known good motor. If it does, then the problem is the motor. If it does not, the problem is upstream from point 1 to point 3.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;With this complete picture, you can pick a point where you can easily figure out if the control successfully reached that point. For example, point 3 above was about the robot controller sending control signals to the motor controller. Ask yourself this question: ''how can you tell if the motor controller received signal from the robot controller?'' For a TalonSRX motor controller used in FRC, one can tell by looking at the LED light on the controller. If the motor controller received a ''forward'' signal, it should flash green. If it received ''reverse'' signal, it should flash red. If this is indeed the case, you can rule out problems from point 1 to point 3. Therefore, the problem is not in the code. If the motor controller does not have status light (e.g. FTC motor controllers), you may pick point 4. Then, the question is: ''how can you tell if the motor controller is sending electricity to the motor?'' You can easily prove that by getting a known good motor and plug it in to the motor controller and see if the code will spin the known good motor. If it does, then the problem is the motor. If it does not, the problem is upstream from point 1 to point 3.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mikets</name></author>
	</entry>
	<entry>
		<id>http://trcnet.asuscomm.com/mediawiki/index.php?title=General_Principles&amp;diff=443&amp;oldid=prev</id>
		<title>Mikets at 19:17, 5 May 2024</title>
		<link rel="alternate" type="text/html" href="http://trcnet.asuscomm.com/mediawiki/index.php?title=General_Principles&amp;diff=443&amp;oldid=prev"/>
		<updated>2024-05-05T19:17:55Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:17, 5 May 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Motor controller sending electricity to the motor.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Motor controller sending electricity to the motor.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Motor moving the mechanism.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Motor moving the mechanism.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;With this complete picture, you can pick a point where you can easily figure out if the control successfully reached that point. For example, point 3 above was about the robot controller sending control signals to the motor controller. Ask yourself this question: ''how can you tell if the motor controller received signal from the robot controller?'' For a TalonSRX motor controller used in FRC, one can tell by looking at the LED light on the controller. If the motor controller received a ''forward'' signal, it should flash green. If it received ''reverse'' signal, it should flash red. If this is indeed the case, you can rule out problems from point 1 to point 3. Therefore, the problem is not in code. If the motor controller does not have status light (e.g. FTC motor controllers), you may pick point 4. Then, the question is: ''how can you tell if the motor controller is sending electricity to the motor?'' You can easily prove that by getting a known good motor and plug it in to the motor controller and see if the code will spin the known good motor. If it does, then the problem is the motor. If it does not, the problem is upstream from point 1 to point 3.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;With this complete picture, you can pick a point where you can easily figure out if the control successfully reached that point. For example, point 3 above was about the robot controller sending control signals to the motor controller. Ask yourself this question: ''how can you tell if the motor controller received signal from the robot controller?'' For a TalonSRX motor controller used in FRC, one can tell by looking at the LED light on the controller. If the motor controller received a ''forward'' signal, it should flash green. If it received ''reverse'' signal, it should flash red. If this is indeed the case, you can rule out problems from point 1 to point 3. Therefore, the problem is not in &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/ins&gt;code. If the motor controller does not have status light (e.g. FTC motor controllers), you may pick point 4. Then, the question is: ''how can you tell if the motor controller is sending electricity to the motor?'' You can easily prove that by getting a known good motor and plug it in to the motor controller and see if the code will spin the known good motor. If it does, then the problem is the motor. If it does not, the problem is upstream from point 1 to point 3.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mikets</name></author>
	</entry>
	<entry>
		<id>http://trcnet.asuscomm.com/mediawiki/index.php?title=General_Principles&amp;diff=438&amp;oldid=prev</id>
		<title>Mikets at 19:08, 5 May 2024</title>
		<link rel="alternate" type="text/html" href="http://trcnet.asuscomm.com/mediawiki/index.php?title=General_Principles&amp;diff=438&amp;oldid=prev"/>
		<updated>2024-05-05T19:08:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:08, 5 May 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Motor controller sending electricity to the motor.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Motor controller sending electricity to the motor.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Motor moving the mechanism.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Motor moving the mechanism.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;With this complete picture, you can pick a point where you can easily figure out if the control successfully reached that point. For example, point 3 above was about the robot controller sending control signals to the motor controller. Ask yourself this question: ''how can you tell if the motor controller received signal from the robot controller?'' For a TalonSRX motor controller used in FRC, one can tell by looking at the LED &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;status &lt;/del&gt;on the controller. If the motor controller received a ''forward'' signal, it should flash green. If it received ''reverse'' signal, it should flash red. If this is indeed the case, you can rule out problems from point 1 to point 3. Therefore, the problem is not in code. If the motor controller does not have status light (e.g. FTC motor controllers), you may pick point 4. Then, the question is: ''how can you tell if the motor controller is sending electricity to the motor?'' You can easily prove that by getting a known good motor and plug it in to the motor controller and see if the code will spin the known good motor. If it does, then the problem is the motor. If it does not, the problem is &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;then in the &lt;/del&gt;upstream from point 1 to point 3.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;With this complete picture, you can pick a point where you can easily figure out if the control successfully reached that point. For example, point 3 above was about the robot controller sending control signals to the motor controller. Ask yourself this question: ''how can you tell if the motor controller received signal from the robot controller?'' For a TalonSRX motor controller used in FRC, one can tell by looking at the LED &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;light &lt;/ins&gt;on the controller. If the motor controller received a ''forward'' signal, it should flash green. If it received ''reverse'' signal, it should flash red. If this is indeed the case, you can rule out problems from point 1 to point 3. Therefore, the problem is not in code. If the motor controller does not have status light (e.g. FTC motor controllers), you may pick point 4. Then, the question is: ''how can you tell if the motor controller is sending electricity to the motor?'' You can easily prove that by getting a known good motor and plug it in to the motor controller and see if the code will spin the known good motor. If it does, then the problem is the motor. If it does not, the problem is upstream from point 1 to point 3.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mikets</name></author>
	</entry>
	<entry>
		<id>http://trcnet.asuscomm.com/mediawiki/index.php?title=General_Principles&amp;diff=437&amp;oldid=prev</id>
		<title>Mikets: Created page with &quot;This section describes general practices of designing, building and debugging the robot. These practices may involve multiple disciplines. Students are highly encouraged to learn multiple disciplines because when the robot ''does not work'', you have no idea if the problem is ''mechanical'', ''electrical'' or ''programming''. Knowing just one discipline will render you handicapped in debugging the root cause. For example, the most common problem is: ''a subsystem does no...&quot;</title>
		<link rel="alternate" type="text/html" href="http://trcnet.asuscomm.com/mediawiki/index.php?title=General_Principles&amp;diff=437&amp;oldid=prev"/>
		<updated>2024-05-05T19:04:57Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This section describes general practices of designing, building and debugging the robot. These practices may involve multiple disciplines. Students are highly encouraged to learn multiple disciplines because when the robot &amp;#039;&amp;#039;does not work&amp;#039;&amp;#039;, you have no idea if the problem is &amp;#039;&amp;#039;mechanical&amp;#039;&amp;#039;, &amp;#039;&amp;#039;electrical&amp;#039;&amp;#039; or &amp;#039;&amp;#039;programming&amp;#039;&amp;#039;. Knowing just one discipline will render you handicapped in debugging the root cause. For example, the most common problem is: &amp;#039;&amp;#039;a subsystem does no...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This section describes general practices of designing, building and debugging the robot. These practices may involve multiple disciplines. Students are highly encouraged to learn multiple disciplines because when the robot ''does not work'', you have no idea if the problem is ''mechanical'', ''electrical'' or ''programming''. Knowing just one discipline will render you handicapped in debugging the root cause. For example, the most common problem is: ''a subsystem does not respond to control''. A programmer may try for hours looking into the code trying to figure out why the code is not controlling the mechanism. But in reality, the cause could be as simple as the motor was unplugged. Therefore, when something is not working, one needs to understand how the mechanism works in the big picture involving both mechanically, electrically and programmatically. The most useful debugging technique is ''divide and conquer''. To apply this technique, you need to understand how the mechanism works in the complete picture.&lt;br /&gt;
# Code reading the gamepad controls.&lt;br /&gt;
# Code sending the gamepad value to the robot controller.&lt;br /&gt;
# Robot controller sending control signals to the motor controller.&lt;br /&gt;
# Motor controller sending electricity to the motor.&lt;br /&gt;
# Motor moving the mechanism.&lt;br /&gt;
With this complete picture, you can pick a point where you can easily figure out if the control successfully reached that point. For example, point 3 above was about the robot controller sending control signals to the motor controller. Ask yourself this question: ''how can you tell if the motor controller received signal from the robot controller?'' For a TalonSRX motor controller used in FRC, one can tell by looking at the LED status on the controller. If the motor controller received a ''forward'' signal, it should flash green. If it received ''reverse'' signal, it should flash red. If this is indeed the case, you can rule out problems from point 1 to point 3. Therefore, the problem is not in code. If the motor controller does not have status light (e.g. FTC motor controllers), you may pick point 4. Then, the question is: ''how can you tell if the motor controller is sending electricity to the motor?'' You can easily prove that by getting a known good motor and plug it in to the motor controller and see if the code will spin the known good motor. If it does, then the problem is the motor. If it does not, the problem is then in the upstream from point 1 to point 3.&lt;/div&gt;</summary>
		<author><name>Mikets</name></author>
	</entry>
</feed>