[Arduino_Nano/atmega328p/I2C_IOexpander]

MCP23017 example from Adafruit MCP23017 Arduino Library

// I2C IO expander controls an LED via an attached button.

mcp23xxx_combo.ino

Download (pzw)

[Arduino_Uno/atmega328p/firmata]

Firmata Library - Standard Firmata

  Firmata is a generic protocol for communicating with microcontrollers
  from software on a host computer. It is intended to work with
  any host computer software package.
  To download a host software package, please click on the following link
  to open the list of Firmata client libraries in your default browser.
  https://github.com/firmata/arduino#firmata-client-libraries
  Copyright (C) 2006-2008 Hans-Christoph Steiner.  All rights reserved.
  Copyright (C) 2010-2011 Paul Stoffregen.  All rights reserved.
  Copyright (C) 2009 Shigeru Kobayashi.  All rights reserved.
  Copyright (C) 2009-2016 Jeff Hoefs.  All rights reserved.
  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.
  See file LICENSE.txt for further informations on licensing terms.
  Last updated August 17th, 2017


StandardFirmata.ino

Download (pzw)

[Arduino_Uno/atmega328p/wires]

Jumper Wires example

This examples show the use of jumper wires to direct connect parts. The microcontroller is not used on example.

Download (pzw)

View Online


[Blue_Pill/stm32f103c8t6/GPIO]

STM32 GPIO Example

Original Link: https://blog.avislab.com/stm32-gpio/

Source code

Download (pzw)

[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


[Remote_TCP/Ripes/LCDSW]

LCD switches Ripes PICSimLab example



How to use this example:
- Load LCDSW.pzw on PICSimLab (experimental version)
- Open Ripes (experimental version) and connect the external bus device.
- Open the file lcdsw.c on Ripes, compile and run.

lcdsw.c source code file


Download (pzw)

[Remote_TCP/Ripes/LED_SW]

LED switches Ripes PICSimLab example



How to use this example:
- Load LED_SW.pzw on PICSimLab (experimental version)
- Open Ripes (experimental version) and connect the external bus device.
- Open the file led_sw.s on Ripes and run.

led_sw.s source code file


Download (pzw)