Subversion Repositories group.electronics

Rev

Rev 182 | Rev 184 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 182 Rev 183
Line 48... Line 48...
48
        public int vccstate { get; set; }
48
        public int vccstate { get; set; }
49
        public int i2caddr { get; set; }
49
        public int i2caddr { get; set; }
50
 
50
 
51
        public i2cmaster i2c { get; set; }
51
        public i2cmaster i2c { get; set; }
52
 
52
 
53
        public void init(int vccstate, int i2caddr, i2cmaster i2c) {
53
        public Oled(int vccstate, int i2caddr, i2cmaster i2c) {
54
            this.vccstate = vccstate;
54
            this.vccstate = vccstate;
55
            this.i2caddr = i2caddr;
55
            this.i2caddr = i2caddr;
56
            this.i2c = i2c;
56
            this.i2c = i2c;
-
 
57
        }
57
 
58
 
-
 
59
        public void init() {
58
            // Init sequence
60
            // Init sequence
59
            oled_command(DISPLAYOFF);
61
            oled_command(DISPLAYOFF);
60
            oled_command(SETDISPLAYCLOCKDIV);
62
            oled_command(SETDISPLAYCLOCKDIV);
61
            oled_command(0x80); // Suggested ratio
63
            oled_command(0x80); // Suggested ratio
62
 
64