Esempio n. 1
0
#!/usr/bin/env python
#
# GrovePi example for the basic functions of Grove 128x64 OLED (http://www.seeedstudio.com/depot/Grove-OLED-Display-112-p-781.html)
#
# The GrovePi connects the Raspberry Pi and Grove sensors.  You can learn more about GrovePi here:  http://www.dexterindustries.com/GrovePi
#
# Have a question about this example?  Ask on the forums here:  http://forum.dexterindustries.com/c/grovepi
#

import grove_128_128_oled as oled

oled.init()  #initialze SEEED OLED display

oled.clearDisplay(
)  #clear the screen and set start position to top left corner
oled.setNormalDisplay()  #Set display to normal mode (i.e non-inverse mode)
oled.setHorizontalMode()  #Set addressing mode to Page Mode

#Eyes
oled.setTextXY(4, 6)
oled.putString("*      *,")
#Mounth
oled.setTextXY(4, 11)
oled.putString("  ~~~~")
Esempio n. 2
0
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
'''

import grove_128_128_oled as oled

oled.init()  #initialze SEEED OLED display

oled.clearDisplay(
)  #clear the screen and set start position to top left corner
oled.setNormalDisplay()  #Set display to normal mode (i.e non-inverse mode)
oled.setPageMode()  #Set addressing mode to Page Mode
for i in range(6):
    oled.setTextXY(i, i)  #Set the cursor to Xth Page, Yth Column
    oled.putString("Hello World!")  #Print the String
Esempio n. 3
0
#!/usr/bin/env python
#
# GrovePi example for the basic functions of Grove 128x64 OLED (http://www.seeedstudio.com/depot/Grove-OLED-Display-112-p-781.html)
#
# The GrovePi connects the Raspberry Pi and Grove sensors.  You can learn more about GrovePi here:  http://www.dexterindustries.com/GrovePi
#
# Have a question about this example?  Ask on the forums here:  http://forum.dexterindustries.com/c/grovepi
#

import grove_128_128_oled as oled

oled.init()  #initialze SEEED OLED display

oled.clearDisplay(
)  #clear the screen and set start position to top left corner
oled.setNormalDisplay()  #Set display to normal mode (i.e non-inverse mode)
oled.setHorizontalMode()  #Set addressing mode to Page Mode

#Eyes
oled.setTextXY(4, 6)
oled.putString("-      -")
#Mounth
oled.setTextXY(4, 11)
oled.putString("  ____")
Esempio n. 4
0
#!/usr/bin/env python
#
# GrovePi example for the basic functions of Grove 128x64 OLED (http://www.seeedstudio.com/depot/Grove-OLED-Display-112-p-781.html)
#
# The GrovePi connects the Raspberry Pi and Grove sensors.  You can learn more about GrovePi here:  http://www.dexterindustries.com/GrovePi
#
# Have a question about this example?  Ask on the forums here:  http://forum.dexterindustries.com/c/grovepi
#

import grove_128_128_oled as oled

oled.init()  #initialze SEEED OLED display

oled.clearDisplay(
)  #clear the screen and set start position to top left corner
oled.setNormalDisplay()  #Set display to normal mode (i.e non-inverse mode)
oled.setHorizontalMode()  #Set addressing mode to Page Mode

#Eyes
oled.setTextXY(4, 6)
oled.putString("*      *")
#Mounth
oled.setTextXY(4, 11)
oled.putString("  \__/")
Esempio n. 5
0
#!/usr/bin/env python
#
# GrovePi example for the basic functions of Grove 128x64 OLED (http://www.seeedstudio.com/depot/Grove-OLED-Display-112-p-781.html)
#
# The GrovePi connects the Raspberry Pi and Grove sensors.  You can learn more about GrovePi here:  http://www.dexterindustries.com/GrovePi
#
# Have a question about this example?  Ask on the forums here:  http://forum.dexterindustries.com/c/grovepi
#

import grove_128_128_oled as oled

oled.init()  #initialze SEEED OLED display

oled.clearDisplay(
)  #clear the screen and set start position to top left corner
oled.setNormalDisplay()  #Set display to normal mode (i.e non-inverse mode)
oled.setPageMode()  #Set addressing mode to Page Mode
for i in range(16):
    oled.setTextXY(0, i)  #Set the cursor to Xth Page, Yth Column
    oled.putString(str(i) + " Hello World!")  #Print the String