Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPU6050 #35

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

MPU6050 #35

wants to merge 4 commits into from

Conversation

oliveiraallex
Copy link
Member

Driver to sensor MPU6050 accelerometer/gyroscope

Copy link
Collaborator

@dionisiydk dionisiydk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

@dionisiydk
Copy link
Collaborator

I have one idea to change package structure.
Would be nice to add meaningful parts to package names. Instead of very raw letters and numbers like:

  • 'PharoThings-Devices-MCP9808'
  • 'PharoThings-Devices-BME280'
  • 'PharoThings-Devices-HD44780'

To have something like:

  • 'PharoThings-Devices-TemperatureSensors-MCP9808'
  • 'PharoThings-Devices-TemperatureSensors-BME280'
  • 'PharoThings-Devices-LCDs-HD44780'

(names are from my bad memory and can be wrong:))
(and maybe WeatherSensors are better than Temperature)

@oliveiraallex
Copy link
Member Author

oliveiraallex commented Aug 7, 2019

Nice idea! Now the number of sensors is growing up, we need to organize them.

What do you think to put these classes inside a package? They are in most cases, 1 class in 1 package. Maybe could be:

  • 'PharoThings-Devices-WeatherSensors'
    • 'PotMCP9808Device'
    • 'PotBME280Device'
  • 'PharoThings-Devices-LCD'
    • 'PotLCDHD44780'
      • PotLCDHD44780Gpio
        • PotLCD1602Device
      • PotLCDHD44780I2C
        • PotLCD1602DeviceI2C
  • 'PharoThings-Devices-SpaceSensors'
    • 'PotADXL345Device'
    • 'PotHCSR04Device'
    • 'PotMPU6050Device'

@dionisiydk
Copy link
Collaborator

dionisiydk commented Aug 7, 2019 via email

@@ -3,5 +3,9 @@ readRegisters: anHex
| h l value |
h := i2cConnection read8BitsAt: anHex.
l := i2cConnection read8BitsAt: anHex + 1.
(h == 0 & l == 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have more meaningful names for h and l it would be much better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to improve it. I rewrote this drive from scratch, I'm just finishing some adjusts to push it again.

@oliveiraallex
Copy link
Member Author

@dionisiydk do you think we can change the name pattern of devices class to start with the word PotDevicexxx instead of PotxxxDevice? Sometimes I forget the name of the sensor and should be better they be shown in the autocompletion when type PotDevice:

image

if it's ok, I'm going to open a new PR to this and to organize the packages, as we talk before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants