How To Install Ubuntu and Raspbian on Your Raspberry Pi 4

In this tutorial, we will set up a Raspberry Pi 4 with both the Ubuntu 20.04 and Raspbian operating systems.

You Will Need

2020-08-29-150822

This section is the complete list of components you will need for this project.

Install Ubuntu

Prepare the SD Card

Grab the USB MicroSD Card Reader.

2020-08-29-151538

Take off the cap of the USB MicroSD Card Reader.

2020-08-29-151621

Stick the MicroSD card inside the Card Reader.

Stick the Card Reader into the USB drive on your computer.

Download the Raspberry Pi Imager for your operating system. I’m using Windows, so I will download Raspberry Pi Imager for Windows.

Open the Raspberry Pi Imager. Follow the instructions to install it on your computer.

When the installation is complete, click Finish.

Open the CHOOSE OS menu.

Scroll down, and click “Ubuntu”.

Select the Ubuntu 20.04 download (32-bit server).

Click CHOOSE SD. 

Select the microSD card you inserted. 

Click WRITE, and wait for the operating system to write to the card. It will take a while so be patient.

While you’re waiting, grab your Raspberry Pi 4 and the bag of heat sinks.

2020-08-29-154338
2020-08-29-154824

Peel off the backup of the heat sinks, and attach them to the corresponding chips on top of the Raspberry Pi.

2020-08-29-154344

Grab the cooling fan.

2020-08-29-155325

Connect the black wire to header pin 6 of the Raspberry Pi. Connect the red wire to header pin 1 of the Raspberry Pi.

2020-08-29-155750

Install the Raspberry Pi inside the case.

2020-08-29-155840

Connect the PiSwitch to the USB-C Power Supply. It should snap into place.

2020-08-29-160447

Once the installation of the operating system is complete, remove the microSD card reader from your laptop.

Set Up Wi-Fi

Reinsert the microSD card into your computer.

2020-08-29-161429

Open your File Manager, and find the network-config file. Mine is located on the F drive in Windows.

Open that file using Notepad or another plain text editor.

Uncomment (remove the “#” at the beginning) and edit the following lines to add your Wi-Fi credentials (don’t touch any of the other lines):

wifis:
  wlan0:
  dhcp4: true
  optional: true
  access-points:
    <wifi network name>:
      password: "<wifi password>"

For example:

wifis:
  wlan0:
  dhcp4: true
  optional: true
  access-points:
    "home network":
      password: "123456789"

Make sure the network name and password are inside quotes.

Save the file.

Set Up the Raspberry Pi

Safely remove the microSD Card Reader from your laptop.

Remove the microSD card from the card reader.

Insert the microSD card into the bottom of the Raspberry Pi.

Connect a keyboard and a mouse to the USB 3.0 ports of the Raspberry Pi.

2020-08-29-165525

Connect an HDMI monitor to the Raspberry Pi using the Micro HDMI cable connected to the Main MIcro HDMI port (which is labeled HDMI 0).

Connect the 3A USB-C Power Supply to the Raspberry Pi. You should see the computer boot.

Log in using “ubuntu” as both the password and login ID. You will have to do this multiple times.

You will then be asked to change your password.

Type:

sudo reboot

Type the command: 

hostname -I 

You will see the IP address of your Raspberry Pi. Mine is 192.168.254.68. Write this number down on a piece of paper because you will need it later.

Now update and upgrade the packages.

sudo apt update
sudo apt upgrade

Now, install a desktop.

sudo apt install xubuntu-desktop

Installing the desktop should take around 20-30 minutes or so.

Once that is done, it will ask you what you want as your default display manager. I’m going to use gdm3.

Wait for that to download.

Reboot your computer.

sudo reboot

Your desktop should show up.

Type in your password and press ENTER.

Click on Activities in the upper left corner of the screen to find applications.

If you want to see a Windows-like desktop, type the following commands:

cd ~/.cache/sessions/

Remove any files in there.

Type:

rm 

Then press the Tab key and press Enter.

Now type:

xfdesktop

Connect to Raspberry Pi from Your Personal Computer

Follow the steps for Putty under step 9b at this link to connect to your Raspberry Pi from your personal computer.

Install Raspbian

Now, we will install the Raspbian operating system. Turn off the Raspberry Pi, and remove the microSD card.

Insert the default microSD card that came with the kit.

Turn on the Raspberry Pi.

You should see an option to select “Raspbian Full [RECOMMENDED]”. Click the checkbox beside that.

Change the language to your desired language.

Click Wifi networks, and type in the password of your network.

Click Install.

Click Yes to confirm.

Wait while the operating system installs.

You’ll get a message that the operating system installed successfully.

Now follow all the steps from Step 7 of this tutorial. All the software updates at the initial startup take a really long time, so be patient. You can even go and grab lunch and return. It might not look like the progress bar is moving, but it is.

2020-08-29-212546

Keep building!

MATLAB Cookbook – Code Examples for the Most Common Tasks

In this post, I will write example code for the most common things you’ll do in MATLAB. MATLAB is a software package used for numerical computation and visualization.

My goal is to write bare-bones, skeleton recipes that can be easily modified and adapted to your own projects.

Prerequisites

  • You have MATLAB installed on your computer. I’m using MATLAB Release 2020a.

Select a Current Directory

Open MATLAB.

In the command window, select your desired Current Folder (i.e. working directory). The syntax is:

cd 'path_to_folder'

For example., in the Command Window, you would type the following command and press Enter in your keyboard:

cd 'C:\Program Files\My_Documents'

Create New Scripts

To create a new script (i.e. the most basic Matlab file with the ‘.m’ extension), run the following command in the Command window.

edit matlab_cookbook_1.m

If this is your first time creating a file in MATLAB, you might see a prompt that asks you “Do you want to create it?”

Highlight “Do not show this prompt again,” and click Yes.

Accept User Input

Write the following code inside matlab_cookbook_1.m.

% Get rid of blank lines in the output
format compact

% Accept a string as input
% Semicolon prevents every variable and output from appearing
% in the command window
name = input("What's your first name : ", "s");

% Check if the user entered something as input
if ~isempty(name)
    fprintf("Hi %s\n", name) 
end

Save the code.

Click Run to run the code.

Type in your name into the Command Window.

Press Enter.

Here is the output:

2-user-input-output

To stop a script from running at any time, you can type CTRL+C.

Now, let’s create a new file named matlab_cookbook_2.m.

edit matlab_cookbook_2.m

Add the following code:

% Get rid of blank lines in the output
format compact

% Accept vector input
vector_input = input("Enter a vector : ");

% Display the vector to the Command Window
disp(vector_input)

Click Run.

Enter your vector. For example, you can enter:

[1 2 3]

Here is the output:

3-enter-your-vector

Declare and Initialize Variables and Data Types

Let’s work with variables and data types (i.e. classes).

Create a new script.

edit matlab_cookbook_3.m

Type the following code.

format compact

% Initialize a character variable
char_1 = 'A'

% Determine the class of a character
class(char_1)

% Initialize a string variable
str_1 = "This is a string"

% Determine the class
class(str_1)

% Evaluate a boolean expression
5 > 2

% Initialize a boolean varable to true
bool_1 = true

% Initialize a boolean variable to false
bool_2 = false

% Check out the maximum and minimum values that can be 
% stored in a data type
intmin('int8')
intmax('int8')

% See the largest double value that can be stored
realmax

% See the largest integer that can be stored
realmax('single')

Run it.

Here is the output:

4-matlab-cookbook3-output1
4-matlab-cookbook3-output2

How do you create an expression that spans more than one line?

Open a new script.

edit matlab_cookbook_4.m
format compact

% An expression that spans more than one line
var_1 = 5 + 5 + 1 ...
      + 1

Save and then run the code. 

5-matlab-cookbook4-output

Casting Variables to Different Data Types

Let’s explore how to cast variables to different data types.

Create a new script.

edit matlab_cookbook_5.m

Type the following code.

format compact

% Create a double (double is the default)
var_1 = 9

% Output the data type
class(var_1)

% Caste the double to an int8 data type
var_2 = int8(var_1)

% Check that the variable was properly converted
class(var_2)

% Convert a character to a double
var_3 = double('A')

% Convert a double to a character 
var_4 = char(64)

Run it.

Here is the output:

6-matlab-cookbook5-output

Formatting Data into a String

Let’s explore how to format data into a string.

Create a new script.

edit matlab_cookbook_6.m

Type the following code.

format compact

% Format output into a string.
% Sum should be a signed integer - %d
sprintf('9 + 2 = %d\n', 9 + 2)

% Format output into a string.
% Sum should be a float with two decimal places
sprintf('9 + 2 = %.2f\n', 9 + 2)

Run it.

Here is the output:

7-matlab-cookbook6-output

Basic Mathematical Operations

Let’s explore how to do basic mathematical operations in MATLAB.

Create a new script.

edit matlab_cookbook_7.m

Type the following code.

% Supress the display of blank lines
format compact 

% Display formatted text
% Addition
fprintf('9 + 2 = %d\n', 9 + 2)

% Subtraction
fprintf('9 - 2 = %d\n', 9 - 2)

% Multiplication
fprintf('9 * 2 = %d\n', 9 * 2)

% Display float with two decimal places
fprintf('9 * 2 = %0.2f\n', 9 / 2)

% Exponentiation
fprintf('5^2 = %d\n', 5^2)

% Modulus
fprintf('5%%2 = %d\n', mod(5,2))

% Generate a random number between 50 and 100
randi([50,100]) 

Run it.

Here is the output:

8-matlab-cookbook7-output

Basic Mathematical Functions

Let’s take a look at some basic mathematical functions in MATLAB.

Create a new script.

edit matlab_cookbook_8.m

Type the following code.

format compact

% This code has some basics mathematical functions
% in MATLAB

% Absolute Value
fprintf('abs(-7) = %d\n', abs(-7))

% Floor
fprintf('floor(3.23) = %d\n', floor(3.23))

% Ceiling
fprintf('ceil(3.23) = %d\n', ceil(3.23))

% Rounding
fprintf('round(3.23) = %d\n', round(3.23))

% Exponential (e^x)
fprintf('exp(1) = %f\n', exp(1)) 

% Logarithms
fprintf('log(100) = %f\n', log(100))
fprintf('log10(100) = %f\n', log10(100))
fprintf('log2(100) = %f\n', log2(100))

% Square root
fprintf('sqrt(144) = %f\n', sqrt(144))

% Convert from degrees to radians
fprintf('90 Deg to Radians = %f\n', deg2rad(90))

% Convert from radians to degrees
fprintf('pi/2 Radians to Degrees = %f\n', rad2deg(pi/2))

%%%% Trigonometric functions%%%
% Sine of argument in radians
fprintf('Sine of pi/2 = %f\n', sin(pi/2))

% Cosine of argument in radians
fprintf('Cosine of pi/2 = %f\n', cos(pi/2))

% Tangent of argument in radians
fprintf('Tangent of -pi/4 = %f\n', tan(-pi/4))

Run it.

Here is the output:

9-matlab-cookbook8-output

To see a big list of the built-in mathematical functions, you can type the following command:

help elfun

Relational and Logical Operators

Create a new script.

edit matlab_cookbook_9.m

Type the following code.

format compact

%{ 
Relational Operators: 
  -- Greater than >
  -- Less than < 
  -- Greater than or equal to >=
  -- Less than or equal to <=
  -- Equal to ==
  -- Not equal to ~=

Logical Operators: 
  -- OR || 
  -- AND &&
  -- NOT ~
%} 

% Example
age = 19

if age < 18
    disp("You are not in college yet")
elseif age >= 18 && age <= 22
    disp("You are a college student")
else
    disp("You have graduated from college")
end   

Run it.

Here is the output:

10-matlab-cookbook9-output

Now, let’s work with switch statements.

edit matlab_cookbook_10.m

Here is the output:

format compact

size = 12

switch size
    case 2
        disp("Too small")
    case num2cell(3:10) % If number is between 3 and 10, inclusive
        disp("Just right")
    case {11, 12, 13, 14} % If number is any of these numbers
        disp("A bit large")
    otherwise
        disp("Too big")
end  

Vectors

edit matlab_cookbook_11.m

Here is the output:

format compact

% Create a vector
vector_1 = [6 9 1 3 8]

% Calculate the length of the vector
vector_1_length = length(vector_1)

% Sort a vector in ascending order
vector_1 = sort(vector_1)

% Sort a vector in descending order
vector_1 = sort(vector_1, 'descend')

% Create a vector that has the numbers 3 through 9
vector_2 = 3:9

% Create a vector of numbers from 10 through 15 in steps of 0.5
vector_3 = 10:0.5:15

% Concatenate vectors
vector_4 = [vector_2 vector_3] 

% Get the first item in the vector above. Indices start at 1.
vector_4(1)
edit matlab_cookbook_12.m
format compact

% Create a vector
vector_1 = [6 9 1 3 8]

% Get the last value in a vector
last_val_in_vector = vector_1(end)

% Change the first value in a vector
vector_1(1) = 7

% Append values to end of vector
vector_1(6) = 99

% Get the first 3 values of a vector
vector_1(1:3)

% Get the first and second value of a vector
vector_1([1 2])

% Create a column vector
col_vector_1 = [6;9;1;3;8]

% Multiply a column vector and a row vector
vector_mult = col_vector_1 * vector_1

% Take the dot product of two vectors
% 2 * 5 + 3 * 9 + 4 * 7 = 65
vector_2 = [2 3 4]
vector_3 = [5 9 7]
dot_product_val = dot(vector_2, vector_3)

Here is the output:

13-matlab-cookbook12-output

Matrix Basics

edit matlab_cookbook_13.m
format compact

% Initialize a matrix
matrix_1 = [4 6 2; 6 3 2]

% Get the number of values in a row
num_in_a_row = length(matrix_1)

% Get the total number of values in a matrix
num_of_vals = numel(matrix_1)

% Size of matrix (num rows   num cols)
matrix_size = size(matrix_1)

[num_of_rows, num_of_cols] = size(matrix_1)

% Generate a random matrix with values between 20 and 30
% Matrix has two rows.
matrix_2 = randi([20,30],2)

% Modify a value inside a matrix (row 1, column 2)
% Remember matrices start at 1
matrix_2(1, 2) = 33

% Modify all row values in the first row
matrix_2(1,:) = 26

% Modify all column values in the first column
matrix_2(:,1) = 95

% Get the first value in the last row
first_val_last_row = matrix_2(end, 1)

% Get the second value in the last column
second_val_last_col = matrix_2(2, end)

% Delete the second column
matrix_2(:,2) = [];

Loops

For loops

edit matlab_cookbook_14.m
format compact

% Loop from 1 through 5
for i = 1:5
    disp(i) % Display
end

% Add a space
disp(' ')

% Decrement from 5 to 0 in steps of 1
for i = 5:-1:0
    disp(i)
end

% Add a space
disp(' ')

% Loop from 1 through 3
for i = [1 2 3]
    disp(i)
end

% Add a space
disp(' ')

% Create a matrix
matrix_1 = [1 4 5; 6 2 7];

% Nested for loop to run through all values in a matrix
for row = 1:2
    for col = 1:3
        disp(matrix_1(row, col))
    end
end

% Go through an entire vector
vector_1 = [2 8 3 5]
for i = 1:length(vector_1)
    disp(vector_1(i))
end

Output:

14-matlab-cookbook14-output

While loops

edit matlab_cookbook_15.m
format compact

% Create a while loop
i = 1
while i < 25
    % If the number is divisible by 5
    if(mod(i,5)) == 0
        disp(i)
        i = i + 1;
        continue
    end
    % Else
    i = i + 1;
    if i >= 14
        % Prematurely leave the while loop
        break
    end
end

Output:

15-matlabcookbook15-output

Matrix Operations

edit matlab_cookbook_16.m

Here is the first part of the output.

format compact

% Initialize a 3x3 matrix
matrix_1 = [4 6 2; 3 6 14; 5 2 9]

matrix_2 = [2:4; 7:9]
matrix_3 = [5:7; 9:11]
matrix_4 = [1:2; 3:4; 2:3]

% Add two matrices together
matrix_2 + matrix_3

% Multiply corresponding elements of two matrices together
matrix_2 .* matrix_3

% Multiply two matrices together
matrix_2 * matrix_4

% Perform the square root on every value in a matrix
sqrt(matrix_1)

% Double everything in a matrix
matrix_2 = matrix_2 * 2

% Sum everything in each column
sum(matrix_2)

% Convert a matrix to a boolean array
% Any value greater than 5 is 1
greater_than_five = matrix_1 > 5

Cell Arrays

edit matlab_cookbook_17.m
format compact

% Create a cell array
cell_array_1 = {'Automatic Addison', 25, [6 32 54]}

% Preallocate a cell array to which we will later assign data
cell_array_2 = cell(3)

% Get the first value in the cell array
cell_array_1{1}

% Add more information 
cell_array_1{4} = 'John Doe'

% Get the length of the cell array
length(cell_array_1)

% Display the values in a cell array
for i = 1:length(cell_array_1)
    disp(cell_array_1{i})
end

Here is the output:

17-matlabcookbook17-output

Strings

edit matlab_cookbook_18.m

format compact

% Initialize a string
my_string_1 = 'Automatic Addison'

% Get the length of the string
length(my_string_1)

% Get the second value in the string
my_string_1(2)

% Get the first three letters of the string
my_string_1(1:3)

% Concatenate
longer_string = strcat(my_string_1, ' We''re longer now')

% Replace a value in a string
strrep(longer_string, 'now', 'immediately')

% Split a string based on space delimiter
string_array = strsplit(longer_string, ' ')

% Convert an integer to a string
num_string = int2str(33)

% Convert a float to a string
float_string = num2str(2.4928)

Here is the output:

18-matlabcookbook18-outputJPG

Structures

Here is how to create your own custom data type using structures. Structures consist of key-value pairs (like a dictionary).

edit matlab_cookbook_19.m
format compact

automatic_addison = struct('name', 'Automatic Addison', ...
    'age', 35, 'item_purchased', [65 23])

% Get his age
disp(automatic_addison.age)

% Add a field
automatic_addison.favorite_food = 'Oatmeal'

% Remove a field
automatic_addison = rmfield(automatic_addison, 'favorite_food')

% Store a structure in a vector
clients(1) = automatic_addison

Here is the output:

19-matlabcookbook19-output

Tables

edit matlab_cookbook_20.m
format compact

name = {'Sam'; 'Bill'; 'John'};
age = [32; 52; 19];
salary = [45000; 90000; 15000]
id = {'1', '2', '3'}

% The name of each row will be the id
employees = table(name, age, salary, ...
    'RowName', id)

% Get the average salary
avg_salary = mean(employees.salary)

% 'help table' command helps you find what you can do with tables

% Add a new field
employees.vacation_days = [10; 20; 15]

Here is the output:

20-matlabcookbook20-output

File Input/Output

edit matlab_cookbook_21.m
format compact

% Generate a random 8x8 matrix
random_matrix = randi([1,5],8)

% Save the matrix as a text file
save sample_data_1.txt random_matrix -ascii

% Load the text file
load sample_data_1.txt

disp sample_data_1 

type sample_data_1.txt

Here is the output:

21-matlabcookbook21-output

Functions

edit matlab_cookbook_22.m
format compact

% Input vector
values = [9.7, 63.5, 25.2, 72.9, 1.1];

% Calculate the average and store it
mean = average(values)

% Define a function named average.m that 
% accepts an input vector and returns the average
function ave = average(x)
    % Take the sum of all elements in x and divide 
    % by the number of elements
    ave = sum(x(:))/numel(x); 
end

Here is the output:

22-matlabcookbook22-output

Creating a Plot

edit basic_plot.m
% Graph a parabola
x = [-100:5:100];
y = x.^2;
plot(x, y)

Here is the output:

23-basic-plotJPG

Creo Parametric 6.0 Quick Start Guide

If you’re an absolute beginner to Creo Parametric, this tutorial is your guide. We’ll go step-by-step through the most common functions you’ll use again and again as you work with Creo Parametric for your design work. By the end of this tutorial, you’ll know how to create the animated part below.

mechanism_basics_creo_parametric_optimized

Creo Parametric is a powerful 3D modeling CAD software program that is used by engineers all over the world. Without further ado, let’s get started!

Table of Contents

Prerequisites

How to Sketch a Rectangle in 2D

Open Creo Parametric.

Close any pop up windows that might appear.

Select your desired working directory.

2-click-newJPG

Click OK on the window that pops up once you’ve selected your desired working directory.

Click New.

Select Sketch.

3-select-sketchJPG

Click OK.

Go to File -> Options -> Sketcher.

Under “Accuracy and Sensitivity” change the Number of decimal places for dimensions to 3 (I like to use 3 decimal places).

Click OK.

Click No at the prompt.

4-click-no-at-the-promptJPG

Click the small arrow next to Rectangle on the Sketch tab on the top of your screen.

5-small-arrowJPG

Select Center Rectangle.

Click a point anywhere.

Drag to create a rectangle.

Click another point to create the rectangle.

Click the Select button to stop creating rectangles.

6-select-buttonJPG

Double-click on one of the dimensions in order to alter it. In this case, I will make both the length and the width equal to 10.000.

7-my-rectangleJPG
8-length-and-width-equal-to-10JPG

The little green squares indicate the constraints. For example, the green square with the black line indicates that the corresponding side of the square is exactly horizontal. Likewise, the sides are vertical. 

To shift the view on the screen, you hold down the Shift key on your keyboard while holding down the middle mouse button (or pressing the scroll wheel on your mouse). It is a bit awkward, but it is what it is.

Similarly, to rotate the object in your view, hold down the Ctrl key on your keyboard while pressing the middle mouse button (or pressing the scroll wheel on your mouse).

You can move the position of the dimension labels (e.g. the 10.000 markets) but click on them and dragging them to where you want them to be.

To save your rectangle, go to File -> Save and then click OK.

Return to Table of Contents

How to Sketch a Circle in 2D

Let’s add a circle to our sketch.

Click the arrow next to Circle.

9-arrow-next-to-circleJPG

Select Center and Point.

Click where you want the center of the circle to be.

Drag your mouse outward to increase the size of the circle.

Click the Select button when done.

Return to Table of Contents

How to Delete a Segment

In order to make our figure a complete solid, we need to delete a segment. 

Click Delete Segment in the upper right.

10-delete-segmentJPG

Click and drag your mouse over the segments you want to delete. In my case, I deleted one half of the circle we just created.

When you are done, click Select (or hit your scroll wheel button somewhere on the canvas away from the sketch you’re creating).

To modify the radius of the circle we’ve created, click on the radius number that is labeled with an ‘R’.

11-new-sketchJPG

You can choose any number. I’ll select 2.000.

12-radius-of-2JPG

Return to Table of Contents

How to Create a Hole

Let’s create a circle within the circle we created. 

Click the arrow next to the Circle button. 

Hover over the center of the original circle you created and click.

Drag your circle to your desired dimensions then click Select.

The diameter of my inner circle is 1.943.

13-then-click-selectJPG

To save what we have so far, go to File -> Save or click the Save icon at the top-left of the window.

Return to Table of Contents

How to Create a New Part in 3D Using Extrude

To create a new part, click on File -> New.

The default selection for Type is Part and Solid for Sub-type. These are fine.

Uncheck the Use default template checkbox.

14-file-newJPG

Click OK.

Select your units. Creo Parametric enables you to choose a variety of predefined systems of units. 

I’ll select mmns_part_solid. mmns means millimeter Newton second, where all lengths are in millimeters, force will be in Newtons, and time will be in seconds.

16-mmns-part-solidJPG

Click OK.

What you see in front of you are three different planes: RIGHT, TOP, and FRONT. These are the three dimensions that your part design will be limited to.

In Creo Parametric, the defaults are:

  • RIGHT = YZ plane
  • TOP = XZ plane
  • FRONT = XY plane
17-three-different-planesJPG

Let’s select the FRONT plane by clicking on it. This is your standard XY plane in the Cartesian Coordinate system.

18-cartesian-coordinate-system

Click the Extrude button.

18-extrude-buttonJPG

Click the Sketch View button to flatten the sketch. The Sketch View button is on the small toolbar above the sketch. 

19-sketch-view-buttonJPG
20-sketch-viewJPG

Click File System in the upper-left part of the screen.

Select the file we’ve been working on so far and click Open.

Click in the middle of the screen to place the sketch.

21-originJPG

Move it to the center of the x-y reference lines by clicking the circle in the middle and dragging it to the origin.

Up top on the bar, you can scale the image to 1.000. To the left of the green checkmark you should see a white box. Put 1.000 in this box, and then click the green checkmark.

22-scale-imageJPG

Now press OK again.

23-click-okJPG

Hold down the middle mouse button (or scroll wheel) while moving your wrist in order to rotate the object and see it in three dimensions.

24-part-in-3dJPG

Change the Depth to 2.000.

25-change-the-depthJPG

Click OK.

26-now-we-have-our-imageJPG

Save it by going to File -> Save or clicking the Save icon at the top-left of the window.

To examine the dimensions of the part, click on Extrude 1 on the left side of the window.

Press Ctrl + E or click the Edit Definition button.

Click Placement -> Edit.

Click the Sketch View icon on the small toolbar to flatten the sketch. You can see the dimensions.

Now click OK.

Click OK again.

That’s it.

Return to Table of Contents

How to Create Additional Parts

Go to File -> New.

27-additional-partJPG

Select Part, Solid, and uncheck ‘Use default template’. You can enter any File name you would like.

Choose mmns_part_solid and click OK.

Click on Extrude.

Click Placement -> Define.

28-placement-defineJPG

Click on the Right plane.

Click Sketch.

29-click-sketchJPG

Click the Sketch View button to flatten the plane.

Click the arrow next to the Circle button.

30-arrow-next-to-circleJPG

Select Center and Point.

Click in the origin of the plane and spread your circle out to your desired dimensions.

31-spread-circle-outJPG

Click Select.

Change the diameter to 2.000. You do that by double-clicking on the current number and entering in your desired diameter.

Click OK.

Change the Depth to 20.000.

32-change-depth-to-20JPG

Click OK.

33-3d-partJPG

If you’re unable to find your part, you can always put it inside the view using the magnifying glass on the left side of the small toolbar.

34-magnifying-glassJPG

Return to Table of Contents

How to Modify an Extruded Part

Right now, all we have is a cylinder. Let’s make our cylinder a nail. To do that, we need to add a head to the cylinder.

Click Extrude again.

Select a surface. I’ll select the circle.

35-surface-selectionJPG

Click the Sketch View button.

Click the arrow next to the Circle button.

Click Center and Point.

Click your mouse in the center of the circle and spread it out.

Ensure your circle has a diameter of 4.000.

36-diameter-of-4JPG

Click OK.

Change the depth to 2.000.

37-change-depth-to-2JPG

Press OK.

Voila! Rotate the image, and you can see we have created a nail.

38-nailJPG

Let’s save the part. Go to File -> Save, and click OK.

Return to Table of Contents

How to Create an Assembly

Go to File -> New.

Select Assembly -> Design.

Uncheck ‘Use default template’.

Click OK.

39-create-an-assemblyJPG

Select mmns_asm_design.

40-mmns-asm-designJPG

Click Assemble in the upper-left part of the window.

41-click-assembleJPG

Find the part you just created and click Open.

42-find-part-click-openJPG
43-part-we-just-createdJPG

Where it says “Automatic,” select “Default.”

44-select-defaultJPG

Click OK. Here is what you should now see.

45-click-okJPG

Click on Assemble again.

Open the circle-rectangle combination part we created at the start of this tutorial.

46-open-the-partJPG

Change the drop-down from Automatic to Coincident.

47-select-coincidentJPG

Click on a part of the long cylinder.

Drag your mouse to the surface of the hole on the circle-rectangle plate.

You see that the nail is now inside the hole.

48-new-assemblyJPG-1

Let’s make the distance from the circle-rectangle plate to the nail head 5.00.

49-distance-5JPG

Click the surface of the plate.

Rotate the assembly, and click the nail surface.

Change the distance to 5.000.

50-brought-closerJPG

Go to File Save.

Return to Table of Contents

How to Create Drawing Views

Go to File -> New.

51-new-assemblyJPG

Uncheck ‘Use default template’.

Click OK.

52-use-default-templateJPG

Change the paper size to A4.

53-change-paper-size-to-a4JPG

Click OK.

Click on General View -> OK.

Click somewhere within the drawing.

54-click-somewhereJPG

On the pop up window, select Standard Orientation.

Click Apply.

Click OK.

Click the Drawing Model button.

Click Add Model.

Select the circle-rectangle plate part.

Click Open

Click Done/Return.

Click General View.

Select No Combined State.

Click OK.

55-click-general-viewJPG

Change Custom Scale to 2.000.

56-custom-scaleJPG

Click Apply.

Click on the part.

Click on Projection View.

57-projection-viewJPG

Click somewhere outside the part.

To turn the axis off, click on the axis button on the small toolbar, and click “Select All.”

58-turn-off-axisJPG

To delete the scale label, click on it and hit delete.

Click on the part again.

Click Projection View.

Edit the definition.

Click View Display, and change the Display style to ‘Hidden.’

59-apply-hiddenJPG

You can do the same for another of your parts, and select ‘No Hidden’. Here are the results of that.

60-no-hiddenJPG

Return to Table of Contents

How to Annotate Dimensions on a Drawing

To add dimensions to a drawing, click the Annotate tab.

Click Dimensions.

Click on a side of the part, and see the dimensions.

61-check-dimensionsJPG

Here is our drawing so far.

62-here-drawingJPG

Return to Table of Contents

How to Export a Drawing as a PDF File

Go to File -> Save As -> Export.

Select pdf.

63-select-pdfJPG

Click Export.

Click OK.

Your PDF will pop up.

Close Export Set Up.

Return to Table of Contents

How to Use Mechanisms

Mechanisms in Creo Parametric enable cool animations.

At the top-left of your window, there is a small arrow that enables you to change windows. Go to the assembly .ASM file.

64-asm-fileJPG
65-asm-fileJPG

On the left-hand side, select the circle-rectangle plate part, and click the Edit Definition icon (or type Ctrl+E).

67-circle-rectangle-partJPG
68-edit-definitionJPG

Click Placement.

Right-click on Coincident.

Click Delete.

Right Click on Distance.

Click Delete.

69-delete-distanceJPG

Go to User Defined dropdown menu, and Select Pin.

Click the arrow on the circle-rectangle plate that is parallel to the nail and hold down your mouse. 

Slide the plate off the nail.

70-slide-off-nailJPG

Click the interior hole of the circle-plate combination.

71-nail-shaftJPG

Drag the cursor to a point on the nail cylinder (i.e. shaft). We have now connected the two surfaces.

72-connect-surfacesJPG

Now click on the flat part of the circle-rectangle plate, and connect that surface to the surface of the nail head that faces the plate.

In the dropdown menu, select Distance.

Change Distance to 20.000.

Now change to 15.000.

74-change-to-15JPG

Click OK (the green check).

75-click-okJPG

Click the Applications tab.

Click Mechanism.

76-click-mechanismJPG

Click the Servo Motors tab.

77-click-servo-motorJPG

Click Profile Details.

Select Velocity in the dropdown menu.

Change Velocity to 10 mm/sec.

78-change-velocityJPG

Now click on the part.

Press OK.

Click on Mechanism Analysis.

Change End Time to 100.

79-change-endtime-to-100JPG

Click Run to run the animation. Here is what you should see:

mechanism_basics_creo_parametric_optimized-1

You can exit when you want to.

Regenerate the model in order to rebuild the changes you have just made.

Click Save.

You can exit the software.

That’s it!

What I have shown you is a quick taste of some of the things Creo Parametric enables you to do. There is much more functionality than what we’ve gone through, but you now have experience with the basics.

Keep building!

Return to Table of Contents