-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from pharo-iot/dev
Merge the Dev branch in the Master branch
- Loading branch information
Showing
362 changed files
with
1,496 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/PharoThings-Devices-BME280.package/PotBME280Device.class/instance/printHumidity.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
printing | ||
printHumidity | ||
^self readHumidity printShowingDecimalPlaces: 1 |
3 changes: 3 additions & 0 deletions
3
src/PharoThings-Devices-BME280.package/PotBME280Device.class/instance/printPressure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
printing | ||
printPressure | ||
^self readPressure printShowingDecimalPlaces: 1 |
3 changes: 3 additions & 0 deletions
3
src/PharoThings-Devices-BME280.package/PotBME280Device.class/instance/printTemperature.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
printing | ||
printTemperature | ||
^self readTemperature printShowingDecimalPlaces: 1 |
2 changes: 1 addition & 1 deletion
2
src/PharoThings-Devices-BME280.package/PotBME280Device.class/instance/readHumidity.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
controlling | ||
readHumidity | ||
^self readParameters last | ||
^self readParameters last round: 1 |
3 changes: 3 additions & 0 deletions
3
src/PharoThings-Devices-BME280.package/PotBME280Device.class/instance/readPressure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
controlling | ||
readPressure | ||
^self readParameters second round: 1 |
2 changes: 1 addition & 1 deletion
2
src/PharoThings-Devices-BME280.package/PotBME280Device.class/instance/readTemperature.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
controlling | ||
readTemperature | ||
^self readParameters first | ||
^self readParameters first round: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"separateMethodMetaAndSource" : false, | ||
"noMethodMetaData" : true, | ||
"useCypressPropertiesFile" : true | ||
} |
33 changes: 33 additions & 0 deletions
33
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
I'm a class to control the ultrasonic HCSR-04 sensors. | ||
You can use many ultrasonic sensors at the same time. Just create a new instance with different gpios. | ||
|
||
How Does it Work? | ||
The ultrasonic sensor uses sonar to determine the distance to an object. Here’s what happens: | ||
- The transmitter (trig pin) sends a signal: a high-frequency sound. | ||
- When the signal finds an object, it is reflected and | ||
- the transmitter (echo pin) receives it. | ||
The time between the transmission and reception of the signal allows us to calculate the distance to an object. This is possible because we know the sound’s velocity in the air. | ||
|
||
To use: | ||
- inspector | ||
ultrasonic := board installDevice: (PotHCSR04Device triggerPin: 11 gpioHeader echoPin: 13 gpioHeader). | ||
|
||
- playground, change the board model to your board | ||
ultrasonic := (RpiBoard3B current) installDevice: (PotHCSR04Device triggerPin: 11 gpioHeader echoPin: 13 gpioHeader). | ||
|
||
You can name the object using | ||
name: 'Left sensor'. | ||
|
||
To read the distance use one of the method below. | ||
|
||
readDistance. "It will return a number". | ||
printDistance. "It will return a string". | ||
|
||
Some of my sensors brothers uses only 1 GPIO to send and read the ultrasonic pulse. | ||
You can set it using the follow method. It will configure trigger and echo pin at the same GPIO: | ||
|
||
ultrasonic := (RpiBoard3B current) installDevice: (PotHCSR04Device signalPin: 13 gpioHeader). | ||
|
||
Sometimes I can freeze. You can reboot me using | ||
|
||
rebootSensor. |
6 changes: 6 additions & 0 deletions
6
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/class/signalPin..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
settings | ||
signalPin: aGPIOPin | ||
^self new | ||
triggerPin: aGPIOPin; | ||
echoPin: aGPIOPin; | ||
yourself |
6 changes: 6 additions & 0 deletions
6
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/class/triggerPin.echoPin..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
settings | ||
triggerPin: aGPIOPin1 echoPin: aGPIOPin2 | ||
^self new | ||
triggerPin: aGPIOPin1; | ||
echoPin: aGPIOPin2; | ||
yourself |
6 changes: 6 additions & 0 deletions
6
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/instance/calculateDistance..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
commands | ||
calculateDistance: aTravelTimeNumber | ||
"distance = (traveltime/2) x speed of sound | ||
The speed of sound is: 343m/s | ||
We need to divide the traveltime by 2 because we have to take into account that the wave was sent, hit the object, and then returned back to the sensor." | ||
^ (aTravelTimeNumber * 34300 / 2 / 1000000) asFloat round: 1 |
3 changes: 3 additions & 0 deletions
3
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/instance/connect.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
initialization | ||
connect | ||
^ nil |
3 changes: 3 additions & 0 deletions
3
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/instance/echoPin..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
echoPin: anObject | ||
^ echoPin := anObject |
3 changes: 3 additions & 0 deletions
3
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/instance/echoPin.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
echoPin | ||
^ echoPin |
3 changes: 3 additions & 0 deletions
3
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/instance/isConfigured.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
initialization | ||
isConfigured | ||
^ triggerPin notNil |
3 changes: 3 additions & 0 deletions
3
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/instance/isConnected.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
initialization | ||
isConnected | ||
^ board notNil |
3 changes: 3 additions & 0 deletions
3
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/instance/peripherals.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
peripherals | ||
^ {triggerPin. echoPin} |
3 changes: 3 additions & 0 deletions
3
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/instance/printDistance.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
commands | ||
printDistance | ||
^ self readDistance printShowingDecimalPlaces: 1 |
12 changes: 12 additions & 0 deletions
12
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/instance/readDistance.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
commands | ||
readDistance | ||
"Send a pulse, read the travel time of pulse and return the distance in cm" | ||
| travelTime semaphore | | ||
semaphore := Semaphore new. | ||
[ self sendPulse. | ||
travelTime := self readPinStateDuration. | ||
semaphore signal ] fork. | ||
semaphore | ||
wait: 100 milliSeconds | ||
onCompletion: [ ^ self calculateDistance: travelTime ] | ||
onTimeout: [ self rebootSensor. ^ -1 ] |
8 changes: 8 additions & 0 deletions
8
...PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/instance/readPinStateDuration.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
controlling | ||
readPinStateDuration | ||
"The echo PIN will be active for the same length of time between sending and receiving the signal. It will be activated after receiving the sound wave back." | ||
| pulseStart pulseEnd | | ||
echoPin beDigitalInput; enablePullDownResister. | ||
[ echoPin value == 0 ] whileTrue: [ pulseStart := Time primUTCMicrosecondsClock ]. | ||
[ echoPin value == 1 ] whileTrue: [ pulseEnd := Time primUTCMicrosecondsClock ]. | ||
^ pulseEnd - pulseStart |
7 changes: 7 additions & 0 deletions
7
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/instance/rebootSensor.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
commands | ||
rebootSensor | ||
"Reset the pins when the sensor freeze" | ||
echoPin beDigitalOutput; value: 1. | ||
1 milliSeconds wait. | ||
echoPin value: 0; beDigitalInput; enablePullDownResister. | ||
triggerPin beDigitalOutput; value: 0 |
5 changes: 5 additions & 0 deletions
5
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/instance/sendPulse.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
controlling | ||
sendPulse | ||
triggerPin beDigitalOutput; value: 0; value: 1. | ||
1 milliSeconds wait. | ||
triggerPin value: 0 |
3 changes: 3 additions & 0 deletions
3
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/instance/triggerPin..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
triggerPin: anObject | ||
triggerPin := anObject |
3 changes: 3 additions & 0 deletions
3
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/instance/triggerPin.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
triggerPin | ||
^ triggerPin |
14 changes: 14 additions & 0 deletions
14
src/PharoThings-Devices-HCSR04.package/PotHCSR04Device.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"commentStamp" : "AllexOliveira 7/19/2019 15:34", | ||
"super" : "PotDevice", | ||
"category" : "PharoThings-Devices-HCSR04", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ | ||
"triggerPin", | ||
"echoPin" | ||
], | ||
"name" : "PotHCSR04Device", | ||
"type" : "normal" | ||
} |
1 change: 1 addition & 0 deletions
1
src/PharoThings-Devices-HCSR04.package/monticello.meta/categories.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SystemOrganization addCategory: #'PharoThings-Devices-HCSR04'! |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(name 'PharoThings-Devices-HCSR04') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"separateMethodMetaAndSource" : false, | ||
"noMethodMetaData" : true, | ||
"useCypressPropertiesFile" : true | ||
} |
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
src/PharoThings-Devices-HD44780.package/PotLCD1602Device.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
initialization | ||
initialize | ||
super initialize. | ||
displayControl := self hexArrayBitOrToNumber:{LCD_DISPLAYON.LCD_CURSOROFF.LCD_BLINKOFF}. | ||
displayFunction := self hexArrayBitOrToNumber:{LCD_4BITMODE.LCD_1LINE.LCD_2LINE.LCD_5x8DOTS}. | ||
displayMode := self hexArrayBitOrToNumber:{LCD_ENTRYLEFT.LCD_ENTRYSHIFTDECREMENT} |
11 changes: 11 additions & 0 deletions
11
src/PharoThings-Devices-HD44780.package/PotLCD1602Device.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "PotLCDHD44780Gpio", | ||
"category" : "PharoThings-Devices-HD44780", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "PotLCD1602Device", | ||
"type" : "normal" | ||
} |
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
src/PharoThings-Devices-HD44780.package/PotLCD1602DeviceI2C.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
initialization | ||
initialize | ||
super initialize. | ||
displayControl := self hexArrayBitOrToNumber: {LCD_DISPLAYON}. | ||
displayFunction := self hexArrayBitOrToNumber: {LCD_4BITMODE. LCD_2LINE. LCD_5x8DOTS}. | ||
displayMode := self hexArrayBitOrToNumber: {LCD_ENTRYLEFT} |
11 changes: 11 additions & 0 deletions
11
src/PharoThings-Devices-HD44780.package/PotLCD1602DeviceI2C.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "PotLCDHD44780I2C", | ||
"category" : "PharoThings-Devices-HD44780", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "PotLCD1602DeviceI2C", | ||
"type" : "normal" | ||
} |
44 changes: 44 additions & 0 deletions
44
src/PharoThings-Devices-HD44780.package/PotLCDHD44780.class/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
I'm a class to control the HD44780 chipset based devices. | ||
|
||
My code was based in python code from Adafruit: | ||
|
||
https://github.com/adafruit/Adafruit_Python_CharLCD/blob/master/Adafruit_CharLCD/Adafruit_CharLCD.py | ||
|
||
To use: | ||
(inspector) | ||
lcd := board installDevice: PotLCD1602Device new. | ||
or to I2C | ||
lcd := board installDevice: PotLCD1602DeviceI2C new. | ||
|
||
(playground. change the board model to your board) | ||
lcd := (RpiBoard3B current) installDevice: PotLCD1602Device new. | ||
or to I2C | ||
lcd := (RpiBoard3B current) installDevice: PotLCD1602DeviceI2C new. | ||
|
||
Sent a message to LCD display: | ||
lcd showMessage: | ||
'your text first row | ||
your text second row' | ||
|
||
Clear LCD display: | ||
lcd clearDisplay | ||
|
||
API: | ||
lcd showMessage: 'Hello | ||
Pharo IoT'. | ||
lcd clearDisplay. | ||
lcd disableBlinkCursor. | ||
lcd disableDisplay. | ||
lcd disableUnderlineCursor. | ||
lcd enableBlinkCursor. | ||
lcd enableDisplay. | ||
lcd enableUnderlineCursor. | ||
lcd moveCursorLeft. | ||
lcd moveCursorRight. | ||
lcd returnHome. | ||
lcd setCursorAtRow:2. | ||
lcd setCursorAtRow:1 column:1. | ||
lcd setLeftAutoScroll. | ||
lcd setLeftToRight. | ||
lcd setRightAutoScroll. | ||
lcd setRightToLeft. |
3 changes: 3 additions & 0 deletions
3
src/PharoThings-Devices-HD44780.package/PotLCDHD44780.class/class/isAbstract.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
testing | ||
isAbstract | ||
^self = PotLCDHD44780 |
5 changes: 5 additions & 0 deletions
5
src/PharoThings-Devices-HD44780.package/PotLCDHD44780.class/instance/clearDisplay.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
commands | ||
clearDisplay | ||
self writeCommand: LCD_CLEARDISPLAY. | ||
3 milliSeconds wait | ||
"waiting to clear the display" |
3 changes: 3 additions & 0 deletions
3
src/PharoThings-Devices-HD44780.package/PotLCDHD44780.class/instance/connect.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
initialization | ||
connect | ||
self subclassResponsibility |
4 changes: 4 additions & 0 deletions
4
src/PharoThings-Devices-HD44780.package/PotLCDHD44780.class/instance/disableBlinkCursor.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
commands | ||
disableBlinkCursor | ||
self | ||
setDisplayControl: (displayControl bitAnd: LCD_BLINKON bitInvert) |
4 changes: 4 additions & 0 deletions
4
src/PharoThings-Devices-HD44780.package/PotLCDHD44780.class/instance/disableDisplay.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
commands | ||
disableDisplay | ||
self | ||
setDisplayControl: (displayControl bitAnd: LCD_DISPLAYON bitInvert) |
4 changes: 4 additions & 0 deletions
4
...haroThings-Devices-HD44780.package/PotLCDHD44780.class/instance/disableUnderlineCursor.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
commands | ||
disableUnderlineCursor | ||
self | ||
setDisplayControl: (displayControl bitAnd: LCD_CURSORON bitInvert) |
4 changes: 4 additions & 0 deletions
4
src/PharoThings-Devices-HD44780.package/PotLCDHD44780.class/instance/enableBlinkCursor.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
commands | ||
enableBlinkCursor | ||
self | ||
setDisplayControl: (displayControl bitOr: LCD_BLINKON) |
4 changes: 4 additions & 0 deletions
4
src/PharoThings-Devices-HD44780.package/PotLCDHD44780.class/instance/enableDisplay.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
commands | ||
enableDisplay | ||
self | ||
setDisplayControl: (displayControl bitOr: LCD_DISPLAYON) |
4 changes: 4 additions & 0 deletions
4
...PharoThings-Devices-HD44780.package/PotLCDHD44780.class/instance/enableUnderlineCursor.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
commands | ||
enableUnderlineCursor | ||
self | ||
setDisplayControl: (displayControl bitOr: LCD_CURSORON) |
4 changes: 4 additions & 0 deletions
4
...haroThings-Devices-HD44780.package/PotLCDHD44780.class/instance/hexArrayBitOrToNumber..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
initialization | ||
hexArrayBitOrToNumber: anArray | ||
^ anArray inject: 0 into: [:each : hex | hex bitOr: each] | ||
"hexArrayToNumber: #(16r06 16r01 16r08) ^16r0F" |
Oops, something went wrong.