image1 image2 image3
Examples
Written by Administrator   
Monday, 10 September 2012 10:03

In this section we propose a list of examples to quickly start to use the 3Dmicro Toolkit.

 

3Dmicro Toolkit v2.1

The following three examples are installed by the version 2.1 of the 3Dmicro Toolkit in your Document directory:

  • Ethernet Communication Example
    This example:
    • Reads the state of 3 switch buttons of the PIC32 Ethernet Starter Kit and turn on/off the corresponding LEDs indicators
    • Sends via Ethernet the number of pressed switches
    • Receives a string and sends it back via Ethernet communication
    • Receives a floating point number and sends it back via Ethernet communication

  • USB Example
    This example:
    • Uses the button switches 1 and 3 to start and stop the sampling session of the button switch 2 (Pressed/Not Pressed)
    • For each session creates a text file with a name that is incremented with the number of sampling session
    • Saves every 250 ms the state of the button switch 2 to the text file

  • Interrupts Example
    This example:
    • Reads the state of the button switch 2 on the Starter Kit and use that to change the Duty Cycle value of the PWM2 (LED2)
    • Receives a string via Serial communication and send it back on the same serial channel
    • Changes the LED3 state (On/Off) depending on the serial string received
    • Sends a string via Serial communication if the Interrupt 0 occurs

 

3Dmicro Toolkit Arduino Expansion V1.0.4

The following examples are compatible with the version 1.0.4 of the 3Dmicro Toolkit Arduino Expansion:

  • ATmega328 Example (e.g. Arduino UNO)
    This example:
    • Changes the PIN status of PIN13 reading the status of the PIN3
    • Changes the PWM one time of the PWM 9 reading a serial command
    • Does the echo of a float variable via serial communication

  • ATmega2560 Example (e.g. Arduino MEGA)
    This example:
    • Reads the state of the PINs form 11 to 13 and send it via serial communication
    • Reads the state of the Analog input AN15 and send it via serial communication
    • Changes the PWM one time of the PWM 6 reading a serial command
    • Does the echo of a float variable via serial communication
    • Blinks the LED (PIN13) every 200 ms
  • Solar Tracker Example (for ATmega328 - e.g. Arduino UNO)
    Italian Guide
    English Guide
    Thi example:
    • Reads the state of the Analog inputs AN0 and AN1 connected to brightness sensors
    • Implement a Proportional control to calculate the position for a servomotor which directs a solar panel
    • Changes the PWM on time of the PWM 9 to drive the servomotor