Git Product home page Git Product logo

stm32's Introduction

DFRobot

This is DFRobot core source files, make Arduino IDE supports STM32F103XX cortex-m3 arm cpu. #how to install and build the deverlopment environment, you can link to these web site:

  1. http://wiki.dfrobot.com.cn/index.php?title=ARDUINO1.6.5%E5%8F%8A%E5%85%B6%E4%BB%A5%E4%B8%8A%E7%89%88%E6%9C%AC%E6%94%AF%E6%8C%81Bluno_M3%E6%95%99%E7%A8%8B&action=edit&redlink=1

2.http://wiki.dfrobot.com.cn/index.php?title=(SKU:DFR0329)Bluno_M3%E6%8E%A7%E5%88%B6%E5%99%A8_%E5%85%BC%E5%AE%B9Arduino

Todo

more info. www.DFRobot.com

stm32's People

Contributors

jiangrunwu avatar ouki-wang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stm32's Issues

Usage of Wire.requestFrom().

The usage of Wire.requestFrom() is not correct in the files:

  • STM32/libraries/DFRobotBlunoM3/ADXL345/ADXL345.ino
  • STM32/libraries/DFRobotBlunoM3/Sample_10Dof/BMP085.ino
  • STM32/libraries/Sample_10Dof/FreeSixIMU/FIMU_ADXL345.cpp
  • STM32/libraries/Sample_10Dof/FreeSixIMU/FIMU_ITG3200.cpp
  • STM32/libraries/Sample_10Dof/HMC5883L/HMC5883L.cpp
  • STM32/libraries/HMC5883L/hmc5883l.cpp
  • STM32/libraries/FreeSixIMU/FIMU_ITG3200.cpp
  • STM32/libraries/FreeSixIMU/FIMU_ADXL345.cpp

The Wire.requestFrom() should not be encapsulated by Wire.beginTransmission() and Wire.endTransmission() and no waiting is needed.

Explanation: Common-mistakes number 1, 2, and 3.

For example this code:

  Wire.beginTransmission(device); //start transmission to device
  Wire.requestFrom(device, num);    // request 6 bytes from device
  
  int i = 0;
  while(Wire.available())    //device may send less than requested (abnormal)
  { 
    buff[i] = Wire.read(); // receive a byte
    delay(30);
    i++;
  }
  Wire.endTransmission(); //end transmission

could be like this:

  Wire.requestFrom(device, num);    // request 6 bytes from device
  if(Wire.available() == num)
  {
    for(int i=0; i<num; i++)
    {
      buf[i] = Wire.read();   // read a byte from the Wire buffer
    }
  }

Read I2C data without STOP bit

I am trying to read I2C data using STM32F103C as a master with Wire library. I need to made continuous readings without sending STOP bit between readings so I am using Wire.requestFrom(Address,size,false) and then Wire.read() functions. When I compile my project in Ardunino 1.8.9 environment I get the error:
no matching function for call to 'TwoWire::requestFrom(const int&, int&, int)

The project is compiled without errors when only 2 parameters are used with Wire.requestFrom(Address,size) function. However I need to avoid sending STOP bit after the read operation is completed. How can this done in my case?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.