Ir para conteúdo
View in the app

A better way to browse. Learn more.

EletrônicaBR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ajuda com exercícios básicos

Featured Replies

Postado

Boas pessoal,

 

Eu estou a procura de alguma ajuda para resolver uns exercícios de arduino para a escola. Pois so me falta a disciplina de microprocessador para finalizar o curso.. e como tal nos nessa disciplina temos um modulo que e aprender a programar o arduino!

 

Eu tenho aqui alguns exercicios que não conseui resolver, se alguem me conseguir ajudar a fazer e tentar meter nos comentarios uma breve explicação agradecia imenso.

 

Eu sei que quem domina arduino e a programação vão achar estes exercícios muito facil de fazer ...   

 

EX.1

Read potentiometer & show value in 7-

segment display

Read value from potentiometer (0-1023)

Display corresponding value (00-99) in 7-

segment display

Hints:

1) You have to convert a decimal value (0-99) into BCD.

Convert each digit at time. For example

• 75: you first convert 7 into BCD, then you convert 5 into BCD

2) To display 2X7-segments in the IDL800A you need to

“multiplex” the 7-seg display. For example

• 75: to display 7, you set the BCD code for 7, “activate” left 7-seg

display (cathode low), “deactivate” right 7-seg display (cathode

high) and wait sometime (about 10 ms)

• Then you set the BCD code for 5, “deactivate” left 7-seg display,

“activate” right 7-seg display and wait sometime (about 10ms)

 

 

EX.2

 

Count up/down:

Display number on 7 segments

• Start at 00

If push button A is pressed

• Count up

If push button B is pressed

• Count down

When the counter is at 99, and button A is

pressed, display must go to 00.

When the counter is at 00, and button B is

pressed, display must go to 99.

 

EX.3

Counter up and reset:

Display number on 7 segments

• Start at 00

Every second the counter goes up (do

NOT use the function delay())

If push button A is pressed counter is

reset, i.e. goes to 00 (use interrupts)

 

EX.4

Read potentiometer:

Read potentiometer

Use LEDs to display value of pot

LED 1: pot 1/8 max value

LED 2: pot 2/8 max value

LED 3: pot 3/8 max value

LED 4: pot 4/8 max value

LED 5: pot 5/8 max value

LED 6: pot 6/8 max value

LED 7: pot 7/8 max value

LED 8: pot equal max value

 

 

Obrigado pessoal

 

 

Participe agora da conversa!

Você pode postar agora e se cadastrar mais tarde. Se você tiver uma conta, faça login para postar com sua conta.

Visitante
Responder

Account

Navigation

Pesquisar

Pesquisar

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.