[Arduino_Uno/atmega328p/AnalogInOutSerial]

Analog input, analog output, serial output

  Reads an analog input pin, maps the result to a range from 0 to 255 and uses
  the result to set the pulse width modulation (PWM) of an output pin.
  Also prints the results to the Serial Monitor.

  The circuit:
  - potentiometer connected to analog pin 0.
    Center pin of the potentiometer goes to the analog pin.
    side pins of the potentiometer go to +5V and ground
  - LED connected from digital pin 9 to ground

  created 29 Dec. 2008
  modified 9 Apr 2012
  by Tom Igoe

  This example code is in the public domain.

  http://www.arduino.cc/en/Tutorial/AnalogInOutSerial
AnalogInOutSerial.ino

Download (pzw)

View Online


[Arduino_Uno/atmega328p/display_bargraph]

LED bar graph


  Turns on a series of LEDs based on the value of an analog sensor.
  This is a simple way to make a bar graph display. Though this graph uses 10
  LEDs, you can use any number by changing the LED count and the pins in the
  array.

  This method can be used to control any series of digital outputs that depends
  on an analog input.

  The circuit:
  - LEDs from pins 2 through 9 to ground

  created 4 Sep 2010
  by Tom Igoe

  This example code is in the public domain.

  http://www.arduino.cc/en/Tutorial/BarGraph
barGraph.ino

Download (pzw)

View Online


[Arduino_Uno/atmega328p/espmsim_server]

Serial esp8266/espmsim TCP server

Open the esp8266 modem simulator in tools menu and connect the serial 
(or a real esp8266 connected in a real serial port).

To use the serial port, first configure the com0com or tty0tty as 
described in the help.

When the server is loaded, open a browser in the address http://127.0.0.1:2000 

espmsim_server.ino

Download (pzw)

[Arduino_Uno/atmega328p/firmata_ethernet]

Firmata Library - Standard Firmata Ethernet

  StandardFirmataEthernet is a TCP client/server implementation. You will need a Firmata client library
  with a network transport that can act as a TCP server or client in order to establish a connection between
  StandardFirmataEthernet and the Firmata client application.
  To use StandardFirmataEthernet you will need to have one of the following
  boards or shields:
  - Arduino Ethernet shield (or clone)
  - Arduino Ethernet board (or clone)
  - Arduino Yun
  Follow the instructions in the ethernetConfig.h file (ethernetConfig.h tab in Arduino IDE) to
  configure your particular hardware.
  NOTE: If you are using an Arduino Ethernet shield you cannot use the following pins on
  the following boards. Firmata will ignore any requests to use these pins:
  - Arduino Uno or other ATMega328 boards: (D4, D10, D11, D12, D13)
  - Arduino Mega: (D4, D10, D50, D51, D52, D53)
  - Arduino Leonardo: (D4, D10)
  - Arduino Due: (D4, D10)
  - Arduino Zero: (D4, D10)
  If you are using an ArduinoEthernet board, the following pins cannot be used (same as Uno):
  - D4, D10, D11, D12, D13


StandardFirmataEthernet.ino

Download (pzw)

[Arduino_Uno/atmega328p/FreeRtos]

Projeto simples com FreeRTOS e Arduino


Principais conceitos de RTOS para iniciantes com Arduino e FreeRTOS escrito por Pedro Bertoleti.


Artigo Original no site Embarcados

Download (pzw)

[Arduino_Uno/atmega328p/LED_matrix_MAX72xx]

LED matrix MAX7211

   matriz_led.ino
  
   Exemplo PONG
   Livro Arduino Básico de Michael McRoberts

matriz_led.ino

Download (pzw)

View Online


[Arduino_Uno/atmega328p/Oscilloscope]

Arduino Uno 3V Oscilloscope

This is my version of the Arduino oscilloscope code.  This file is strictly the display code for 
one analog channel.  It will soon be merged into my data logger project.

This is shared so others may incorporate the display code into their projects.  It has been modified to 
play nice with the Adafruit 5110 LCD library.

This is a work in progress but hopefully it will help someone else by providing
a base to start and work from.

Please check out my Youtube videos here and consider a thumbs up if this helped you!
Youtube : http://www.youtube.com/mkmeorg

Full Arduino Tutorial Playlist here: https://www.youtube.com/playlist?list=PLxyM2a_cfnzjXms2WRO9OdAr-_7K-Ve2Z

Original code comment text:
###########################################################
  Title:       Arduino Uno 3V Oscilloscope
  Purpose:     Use a Nokia 5110 LCD screen with the arduino
  Created by:  Brian O'Dell from the Fileark Arduino Oscilloscope.
  Note:        Please reuse, repurpose, and redistribute this code.
  Note:        This code uses the Adafruit PDC8544 LCD library  
###########################################################
https://github.com/Megamemnon/Arduino-Oscilloscope/blob/master/Uno3VOScope.ino
oscilloscope.ino

Download (pzw)

View Online


[Arduino_Uno/atmega328p/servo_Knob]

Controlling a servo position using a potentiometer (variable resistor)

 Controlling a servo position using a potentiometer (variable resistor)
 by Michal Rinott 

 modified on 8 Nov 2013
 by Scott Fitzgerald
 http://www.arduino.cc/en/Tutorial/Knob
Knob.ino

Download (pzw)

View Online


[Arduino_Uno/atmega328p/webserver]

library Ethernet example: WebServer

  Web Server
 A simple web server that shows the value of the analog input pins.
 using an Arduino Wiznet Ethernet shield.
 Circuit:
 * Ethernet shield attached to pins 10, 11, 12, 13
 * Analog inputs attached to pins A0 through A5 (optional)
 created 18 Dec 2009
 by David A. Mellis
 modified 9 Apr 2012
 by Tom Igoe
 modified 02 Sept 2015
 by Arturo Guadalupi


Open a browser on address http://127.0.0.1:2080
WebServer.ino

Download (pzw)

[Breadboard/PIC16F777/test_b0]

Simple example for testing board features.

1- Ask to turn on all dip switches;
2- Tests LCD display;
3- Tests 7-segment displays;
4- Test the red LEDs connected to the PORTB and PORTD;
5- Tests push buttons;
6- Test the serial port transmitting;
7- Test the serial port receiving;
8- Tests AD converters connected to potentiometers;
9- Test Relays
10- Tests temperature measurement;
11- Turn on the Heater;
12- Turn on the fan and measure the speed.
13- Tests the matrix keyboard
14- Tests internal eeprom

MPLABX test_b0 project


Download (pzw)

View Online


[Breadboard/PIC16F877A/test_b0]

Simple example for testing board features.

1- Ask to turn on all dip switches;
2- Tests LCD display;
3- Tests 7-segment displays;
4- Test the red LEDs connected to the PORTB and PORTD;
5- Tests push buttons;
6- Test the serial port transmitting;
7- Test the serial port receiving;
8- Tests AD converters connected to potentiometers;
9- Test Relays
10- Tests temperature measurement;
11- Turn on the Heater;
12- Turn on the fan and measure the speed.
13- Tests the matrix keyboard
14- Tests internal eeprom

MPLABX test_b0 project


Download (pzw)

View Online


[Breadboard/PIC18F4520/ADC_7segLatch]

Counter with decoder and latch

Simple example of how to use the latched 7-segment display with decoder and ADC
main.c

Download (pzw)

View Online


[Breadboard/PIC18F452/test_b0]

Simple example for testing board features.

1- Ask to turn on all dip switches;
2- Tests LCD display;
3- Tests 7-segment displays;
4- Test the red LEDs connected to the PORTB and PORTD;
5- Tests push buttons;
6- Test the serial port transmitting;
7- Test the serial port receiving;
8- Tests AD converters connected to potentiometers;
9- Test Relays
10- Tests temperature measurement;
11- Turn on the Heater;
12- Turn on the fan and measure the speed.
13- Tests the matrix keyboard
14- Tests internal eeprom

MPLABX test_b0 project


Download (pzw)

View Online


[Breadboard/PIC18F4550/PID]

Discrete Transfer Function and PID example.

1- Use potentiometer to define setpoint
2- Use RB0 switch to select open loop or closed loop with PID controller

Use octave or matlab to calculate transfer function coeficients:

>>gs = tf([1],[0.2 0.25 1]);

Transfer function 'gs' from input 'u1' to output ...

               1
 y1:  --------------------
      0.2 s^2 + 0.25 s + 1

Continuous-time model.

>> gd=c2d(gs,0.1)

Transfer function 'gd' from input 'u1' to output ...

       0.02389 z + 0.02291
 y1:  ----------------------
      z^2 - 1.836 z + 0.8825

Discrete-time model Ts=0.1.


MPLABX PID project


Download (pzw)

View Online


[Breadboard/PIC18F4550/test_b0]

Simple example for testing board features.

1- Ask to turn on all dip switches;
2- Tests LCD display;
3- Tests 7-segment displays;
4- Test the red LEDs connected to the PORTB and PORTD;
5- Tests push buttons;
6- Test the serial port transmitting;
7- Test the serial port receiving;
8- Tests AD converters connected to potentiometers;
9- Test Relays
10- Tests temperature measurement;
11- Turn on the Heater;
12- Turn on the fan and measure the speed.
13- Tests the matrix keyboard
14- Tests internal eeprom

MPLABX test_b0 project


Download (pzw)

View Online


[Breadboard/PIC18F4620/test_b0]

Simple example for testing board features.

1- Ask to turn on all dip switches;
2- Tests LCD display;
3- Tests 7-segment displays;
4- Test the red LEDs connected to the PORTB and PORTD;
5- Tests push buttons;
6- Test the serial port transmitting;
7- Test the serial port receiving;
8- Tests AD converters connected to potentiometers;
9- Test Relays
10- Tests temperature measurement;
11- Turn on the Heater;
12- Turn on the fan and measure the speed.
13- Tests the matrix keyboard
14- Tests internal eeprom

MPLABX test_b0 project


Download (pzw)

View Online


[ESP32_DevKitC/ESP32/AdcMeasuring]

ESP32 ADC with Arduino IDE

Measuring voltage example

Source code

Download (pzw)

[PICGenios/PIC18F4550/Parts_Demo]

Simple example for servomotor and stepper motor testing.

Servo motor connected in RB0 controlled by AN0 analog channel.
Stepper motor connected to RB7, RB6, RB5 and RB4.
MPLABX Parts_Demo project

Download (pzw)

View Online