Opened 10 years ago

Closed 10 years ago

#4395 closed enhancement (invalid)

Integrate the accelerometer into Sugar Activities

Reported by: tonyforster Owned by: erikos
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Sugar Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed


Opening this ticket as a more permanent reminder of the results of investigations in Gci2012, covers multiple components, Sugargames, Paint, Physics, Abacus, Chat, Ruler*, Jukebox, Maze.

*this functionality is now in Level Tool

"How to integrate into Sugar Wrapper for PyGames:
The android subset of PyGames includes accelerometer reading. For constancy, the same style should be used. The existing Android subset has a method accelerometer_reading() that returns the tuple of floats corresponding the XYZ coordinate system. This is for a best practice, to be consistent between different versions of PyGames. The Android subset/project may or may not be official, but consistency is important none the less. It also would be convenient for the developers for an API to be included that allows returns the direction the device is moving. For example, when titling to the left, this method (accelerometer_direction()) would return “left” or an integer LEFT that has a constant value.
The backend code for this API would need to be hardware dependent, because I was unable to turn up any cross-platform tool that would do this automatically.

Examples of how to integrate the accelerometer into existing Sugar activities:

Paint: Use the accelerometer to move the brush. Have it start off in the middle. The brush is “up” moving but not drawing when the screen is being touched or the mouse is clicked.
Physics: use the accelerometer to shift gravity. I.e. tilting to the left causes all objects to slide/roll/move to the left
Abacus: shake to reset back to zero
Chat: tilt left or right to change the chat window. This is not a super-important feature to add.
Ruler: Measure the tilt from normal (straight up and down) in both degrees and radians. Maybe include something about the sine and cosine at the given angle. Default to degrees but include an option for radians
Jukebox: Tilt to alter the speed (away and towards the user). Left and right alters the location in the song
Maze: Control the ball through the accelerometer.
Any activity that is not included here was evaluated, but there was nothing to be gained by adding in accelerometer functionality, in my opinion; if there is nothing to be gained, there is no sense in adding it into the engine. "

Change History (2)

comment:1 Changed 10 years ago by dnarvaez

  • Component changed from untriaged to sugar
  • Owner set to erikos

Temptatively assigning to sugar.

comment:2 Changed 10 years ago by dnarvaez

  • Resolution set to invalid
  • Status changed from new to closed

I think keeping a bug with these ideas is not going to achieve much. People are not going to see it here especially since only core developers are watching this component. I'd suggest to post this to the mailing lists instead.

Note: See TracTickets for help on using tickets.