Bird
0
0
PCB Designbi_tool~10 mins

Component orientation conventions in PCB Design - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the default orientation of a component to 0 degrees.

PCB Design
component.orientation = [1]
Drag options to blanks, or click blank then click option'
A0
B270
C180
D90
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 90 or 180 degrees which rotate the component unnecessarily.
Confusing orientation with position coordinates.
2fill in blank
medium

Complete the code to rotate a component by 90 degrees clockwise.

PCB Design
component.orientation = (component.orientation + [1]) % 360
Drag options to blanks, or click blank then click option'
A180
B45
C270
D90
Attempts:
3 left
💡 Hint
Common Mistakes
Using 45 degrees which is a smaller rotation.
Forgetting to use modulo 360 causing orientation to exceed 359.
3fill in blank
hard

Fix the error in the code that sets component orientation to 270 degrees but mistakenly uses a string.

PCB Design
component.orientation = [1]
Drag options to blanks, or click blank then click option'
Acomponent.orientation
B"270"
C270
D90
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string instead of a number.
Assigning an incorrect degree value.
4fill in blank
hard

Fill both blanks to correctly flip a component horizontally and then rotate it by 180 degrees.

PCB Design
component.flip = [1]
component.orientation = (component.orientation + [2]) % 360
Drag options to blanks, or click blank then click option'
ATrue
BFalse
C180
D90
Attempts:
3 left
💡 Hint
Common Mistakes
Not enabling flip before rotation.
Using 90 degrees instead of 180 for rotation.
5fill in blank
hard

Fill all three blanks to set a component's orientation to 90 degrees, flip it vertically, and then reset orientation to 0.

PCB Design
component.orientation = [1]
component.flip_vertical = [2]
component.orientation = [3]
Drag options to blanks, or click blank then click option'
A90
BTrue
C0
DFalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using False instead of True for flip_vertical.
Not resetting orientation to 0 after flipping.