Analog Output, Binary, Decimal, and Hexadecimal

0.0(0)
Studied by 6 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/6

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:52 AM on 1/23/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

7 Terms

1
New cards

Hardcoding

When the code explicitly gives directions instead of using a sensor or logic

2
New cards


Programming Concepts: Variable Types:


8 bits

8 bits = 1 Byte

Char - character


16 bits

int - integer

unsigned int


32 bits

long 

unsigned long 

float - floating decimal place

Binary - two-based system 


Fading in and Fading Out (Analog or Digital?)

A few pins on the Arduino allow for us to modify the output to mimic an analog signal.

This is done by a technique called Pulse Width Modulation (PWM) - a method to stimulate/imitate an analog signal by turning a digital pin ON and OFF at strategic intervals


3
New cards

Analog v. Digital


To create an analog signal, the microcontroller uses a technique called PWM. By varying the duty cycle, we can mimic an “average” analog voltage.


50% duty cycle- turning on half time

10% duty cycle - turning on 10% of time


PWM

Medium voltage pwm signal, low voltage, high voltage

0 - 255

0V - 5V


4
New cards

fading lights

Project - Fading Lights

analogWrite (pin, val);

Pin - refers to the OUT pin (limited to pins 3, 5, 6, 9, 10, 11.) - denoted by a ~ symbol

Val - 8 bit value (0-255)

0=> 0V | 255 => 5V

Move one of your LED pins over to 9

PWM O/P Signal

Digital Sensor (I/P_

Ohms - Pull Digital Signal - pull down resistor connects to this write and button , allows these two halves to connect


5
New cards

fading lgihts 2.0

Pin mode to establish pin modes activaitng

Brightness = brightness + fadeAmount,

“New brightness is the current brightness plus the fade amount.” 

New brightness = old brightness + 5

6
New cards

What is binary?

Coding language of 1s and 0s. Two states (on/off).

How is binary useful?

Direct communication with computers. Simple way to store data.

How is it similar to the decimal number system?

Both rely on numerical positioning


A computing device uses binary to communicate with its individual parts, other devices, and its user.

The number values represent different pieces of information (data) which is translated / interpreted by devices or users.

Bit - a single digit. Basic unit of storage.

Byte - 8 binary bits.

decimal - base 10 number system
Hexadecimal - base 16 number system

binary - base 2 number system

Each hex digit is the equivalent of ½ of a binary byte AKA 1 hex bit = 4 binary bits.

7
New cards
  • What is binary?

 Binary is a base-2 number system using only 0s and 1s. They represent the “on” and “offs” of electrical circuits.

  • How is binary useful?

Binary allows for the efficient storage and processing of data. It also provides a universal language for communication between computers and other digital devices, allowing them to interact with one another.

  • How is it similar to the decimal number system?

Both binary and decimal systems are positional numeral systems that use place value, where a digit's significance depends on its position. The decimal number system uses base-10 (0-9) while binary uses base-2 (0, 1). Both follow the same pattern of carrying over when a digit reaches its maximum value.


..

Explore top notes

note
Clase 1 IA
Updated 942d ago
0.0(0)
note
How to sing
Updated 309d ago
0.0(0)
note
6.2 Expansion of Imperialism
Updated 1143d ago
0.0(0)
note
Military Leaders
Updated 770d ago
0.0(0)
note
Clase 1 IA
Updated 942d ago
0.0(0)
note
How to sing
Updated 309d ago
0.0(0)
note
6.2 Expansion of Imperialism
Updated 1143d ago
0.0(0)
note
Military Leaders
Updated 770d ago
0.0(0)

Explore top flashcards

flashcards
Media, Culture & Society
44
Updated 879d ago
0.0(0)
flashcards
Biology Test 4 SG
28
Updated 1209d ago
0.0(0)
flashcards
AP Bio Unit 1 Test
116
Updated 211d ago
0.0(0)
flashcards
intro to chem
51
Updated 581d ago
0.0(0)
flashcards
Bio Unit 1
75
Updated 924d ago
0.0(0)
flashcards
Elements To Know study guide
59
Updated 203d ago
0.0(0)
flashcards
Respiration and Excretion
85
Updated 288d ago
0.0(0)
flashcards
Media, Culture & Society
44
Updated 879d ago
0.0(0)
flashcards
Biology Test 4 SG
28
Updated 1209d ago
0.0(0)
flashcards
AP Bio Unit 1 Test
116
Updated 211d ago
0.0(0)
flashcards
intro to chem
51
Updated 581d ago
0.0(0)
flashcards
Bio Unit 1
75
Updated 924d ago
0.0(0)
flashcards
Elements To Know study guide
59
Updated 203d ago
0.0(0)
flashcards
Respiration and Excretion
85
Updated 288d ago
0.0(0)