GithubHelp home page GithubHelp logo

Analog Input about kobuki HOT 3 CLOSED

yujinrobot avatar yujinrobot commented on August 26, 2024
Analog Input

from kobuki.

Comments (3)

stonier avatar stonier commented on August 26, 2024

http://redmine.yujin.com/issues/1671

from kobuki.

stonier avatar stonier commented on August 26, 2024
 1         data.gp_adc[0] = mpuAdc()( gpADC_0 );
 2         data.gp_adc[1] = mpuAdc()( gpADC_1 );
 3         data.gp_adc[2] = mpuAdc()( gpADC_2 );
 4         data.gp_adc[3] = mpuAdc()( gpADC_3 );
 5         data.gp_adc[4] = mpuAdc()( gpADC_4 );
 6         data.gp_adc[5] = 0; //mpuAdc()( gpADC_5 );
 7         data.gp_adc[6] = 0; //mpuAdc()( gpADC_6 );
 8 
 9         data.gp_input = 0;
10         data.gp_input |= read_gpi(gpioDI_0) ? 1 : 0;
11         data.gp_input |= read_gpi(gpioDI_1) ? 2 : 0;
12         data.gp_input |= read_gpi(gpioDI_2) ? 4 : 0;
13         data.gp_input |= read_gpi(gpioDI_3) ? 8 : 0;
14         data.gp_input |= read_gpi(gpioDI_4) ? 16 : 0;  
15 
16         data.gp_input |= 0; // read_gpi(gpioRobotOnOff) ? 32 : 0;            // robot on-off
17         data.gp_input |= read_gpi(gpioDI_5) ? 64 : 0;     
command_id
16 bits for gp inputs
7 ADC value (unsigned short int)

from kobuki.

stonier avatar stonier commented on August 26, 2024

It's publishing fine on core sensors. I just trimmed back the vector a little to remove the two redundant zeros at the end. Also why is there a fifth analog value???

from kobuki.

Related Issues (20)

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.