post
poster: Xorm
description: Housebot_002_main
language: plain text
[download]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/* BOTBALL 2007 CODE */
// Preliminary code for HouseBot, aka PSAW

/* Finished functions:
void raise_claw()
void drop_claw()
void demo() [picks up anything within range of the CLAW.]
void act_claw(int dir) [actuates the claw. 0 for open, 1 for closed.]

/* TODO:
        - Fill in killswitch()
        - Drive functions
        - directives for the game
        - blob following and actions
        - Everything else >_>
*/


#use defines.ic // where we keeps the definitions yais
#use functions.ic

void main()
{   
    
    start_process(update_camdata());
    
    initialize_servo_positions();
    enable_servos();
    start_process(killswitch());
    //    demo();
    get_blue_ball();
    
    sleep(1.0);
    disable_servos();
    
}

// STUFF ________________
/* HARDWARE:
        Motors/Servos:
                - MOTOR #1 Claw motor (white legoshaft motor)
                - SERVO #1 Claw servo (standard + horn)
                - MOTOR STBD drive motor (type: black)
                - MOTOR PORT drive motor (type: black)
                - MOTOR House-shield dispenser
                - SERVO House-capture claw/mechanism
                - SERVO House-capture claw/mechanism
                
          Total: 4 motors, 3 servos.      
          
        Sensors:
                - SWITCH #1 claw touch sensor
                - CAMERA XBCCam vision system
                - DIST   E-T IR distance sensor for blueballs
                
*/

/* Tasks:
        - picks up blue foam balls
        - gathers the "houses" in underchamber
        - drops "shields" in the "houses"
        - drops blueballs in bins
        - returns home w/houses
        - wreaks havocs?
*/

// END STUFF ___________________

// EOF