Project

General

Profile

Revision 5866cb38

ID5866cb38bf3954babc911a0d0bea69b8dc696cba

Added by Alex Zirbel about 12 years ago

Linesensor tested and done!

View differences:

scout/libscout/src/behaviors/sim_line.cpp
25 25

  
26 26
#include "sim_line.h"
27 27

  
28
using namespace std;
29

  
28 30
void sim_line::run()
29 31
{
30 32
    while(ok())
31 33
    {
32 34
        motors->set_sides(10, 20, MOTOR_ABSOLUTE);
33 35

  
34
        linesensor->query();
36
        vector<uint32_t> readings = linesensor->query();
37

  
38
        for (int i = 0; i < 8; i++)
39
        {
40
            cout << "[" << i << "]" << ": " << readings[i] << ", ";
41
        }
42
        cout << endl;
35 43

  
36 44
        spinOnce();
37 45
        loop_rate->sleep();

Also available in: Unified diff