Difference between revisions of "radino32 software"

From InCircuit
Jump to: navigation, search
Line 9: Line 9:
 
|'''radino32'''<br />[[radino32 software]]
 
|'''radino32'''<br />[[radino32 software]]
 
|-
 
|-
|[[radino software]]
+
|[[radino software]]<br />[[radino common problems]]
 
|colspan=3 | [[radino WiFi software]]<br />[[radino WiFi software#First_Steps|First Steps]] | [[radino WiFi software#Howto|Howto]] | [[radino WiFi software#FAQ|FAQ]]
 
|colspan=3 | [[radino WiFi software]]<br />[[radino WiFi software#First_Steps|First Steps]] | [[radino WiFi software#Howto|Howto]] | [[radino WiFi software#FAQ|FAQ]]
 
|
 
|

Revision as of 11:28, 24 November 2016


radino Library
radino radino32
radino32 software
radino software
radino common problems
radino WiFi software
First Steps | Howto | FAQ
IC ESP ESP8266EX HTTPD IC ESP8266EX interface

This page describes how to use the radino32 module.

Descriptions are limited mostly to differences to the radino modules. For the rest see radino WiFi software.

Overview

The radino Library since version 4 includes all files required to compile and upload sketches using the Arduino 1.6.0 / 1.6.1.

Extract this library into your %ARDUINO_APPDATA% folder as described at radino software.

Afterwards the radino32 is selectable within the Arduino IDE under "Tools->Board" as "radino32 USB-Load".

Implementation Progress

The example sketch "Blink" is included and tested. Soon some examples for the radino32 WiFi and radino32 CC1101 will follow.

The sketch "radino32_WiFi_Firmwareupdate" allows to flash the Firmware of the ESP8266EX on the radino32 WiFi and direct communication with it.

Implemented and tested features:

  • Serials 1-3
  • GPIOs
  • Interrupts

Soon to come

Howto

Compiling sketches

As the Arduino team removed the gcc compiler for ARM based devices from Arduino IDE 1.6.2 and following. The sketches for the radino32 can only be compiled with versions 1.6.0 or 1.6.1 of the Arduino IDE.

  • Select "radino32 USB-Load" under "Tools->Board". (All radino32 can be programmed using this option)
  • Hit the Verify button.

Uploading sketches

  • Start the bootloader on the radino32 as described here: #Starting the bootloader
  • Start uploading within the Arduino IDE.
  • After the upload finished. Reset the radino32 and it will execute the uploaded sketch.

Starting the bootloader

Method 1:

  • Pull pin "BOOT_SEL" high (You can achieve this by shortening the pin with "VCC" directly besides it).
  • Apply a high pulse to pin "RESET".
  • Release pin "BOOT_SEL".

Method 2:

  • Disable supply voltage to the module.
  • Pull pin "BOOT_SEL" high (You can achieve this by shortening the pin with "VCC" derectly besides it).
  • Apply supply voltage.
  • Release pin "BOOT_SEL".

Method 3:

Installing bootloader drivers

  • After entering the Bootloader windows will detect the new device.
  • Use the driver installation tool under "%ARDUINO_APPDATA_FOLDER%/hardware/ICT_Boards/stm32l1/driver/win" to install drivers for the STM32 Bootloader.
  • Make sure within the installation tool "libusbK (v3.0.7.0)" is selected.

On Windows 7 or newer it is necessary to prevent installation of other stm32 drivers. radino32 driver installation on Windows 7 explains how to do so.

Bootloader is not recognized

Please look at radino common problems#radino32 USB connection fails

Usage

UART

The radino32 module has two external hardware UARTS, named Serial1 and Serial2. Both support baud rates up to 115200.


USB serial

The USB serial is started by using

serial.begin();

within your setup routine. Afterwards it is used simliar to the UARTs. If problems arise please have a look at radino common problems#radino32 USB connection fails

Getting USB serial drivers

GPIOs

The radino32 module has 23 multifunctional GPIOs (15 PWM, 10 ADC IN, 1 DAC OUT). See the table below for which pins belong to which group.

Available GPIOs on the radino32 module.
group pins
PWM (out) A0, A1, A3, 2, 3, 5, 6, 10, 11, 12, 13, 14, 15, 16, 18
DAC (out) A2
digital A0, A1, A2, A3, A5, 0, 1, 2, 3, 5, 6, 10, 11, 12, 13, 14, 15, 16, 17, 18, 25, 26, 27
ADC (in) A0, A1, A2, A3, A5, 6, 10, 11, 12, 13


Writing

In order to write to a GPIO you have to set the pinMode first. Digital pins can use mode OUTPUT or OUTPUT_OPEN_DRAIN. For analog pins you have to set mode to PWM.

   pinMode(digitalPin, OUTPUT);
   pinMode(analogPin, PWM);

To write a GPIO you can use digitalWrite (values: LOW, HIGH) and analogWrite (values: 0 - 1023) respectively.

   digitalWrite(digitalPin, HIGH);
   analogWrite(analogPin, 1023);

To set the GPIO in one cycle you have to use constants as pin numbers. This way you can toggle the GPIO with full clock speed.

   digitalWrite(5, HIGH);
This table shows which pinMode can be used for digital and analog pins.
mode PWM pins
pinMode(PWM)
DAC pin
pinMode(PWM)
output
pinMode(OUTPUT)
pinMode(OUTPUT_OPEN_DRAIN)
analog yes
(pwm signal)
yes
(voltage level)
-
digital - - yes


Reading

Similar to writing you have to setup the GPIO pins first. You can set pinMode to INPUT or INPUT_PULLUP. INPUT_FLOATING is a synonym for INPUT. For Analog pins use INPUT_ANALOG

   pinMode(digitalPin, INTPUT_PULLUP);
   pinMode(analogPin, INTPUT_ANALOG);

To read a GPIO you can use digitalRead and analogRead respectively.

  int digitalValue = digitalRead(digitalPin);
  int analogValue = analogRead(analogPin);

It will not work if you try to read a digital pin with analogRead or vice-versa.


WiFi

Sketches using WiFi (IC_ESP library) only need modified include headers:

  #include <radino32_UART.h>
  #include <IC_ESP.h>

The rest works similar to the sketches for the radino modules.

Personal tools