Skip to content

startSensingTimed syntax error #84

@GoogleCodeExporter

Description

@GoogleCodeExporter
trying to run the following code on QPython installed on my Samsung Grand Duo:

import android # I also tryed using androidhelper with same result
import time
droid = android.Android()
dt = 100 #100ms between sensings
endTime = 3000 #sample for 3000ms timeSensed=0 droid.startSensingTimed(2,dt)
while timeSensed <= endTime:
     print droid.sensorsReadAccelerometer().result
     time.sleep(dt/1000.0)
     timeSensed+=dt
droid.stopSensing()

I expect it to print on the screen some data from the accelerometer, instead I 
receive the following error:

droid.startSensingTimed(2,dt)
                ^
SyntaxError: invalid syntax

I am using QPython 0.9.8.2 on Android 4.2.2

Could anybody help me to understand why it's not working, please?

Original issue reported on code.google.com by [email protected] on 6 Aug 2014 at 8:45

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions