[sugar] Changing Name of Alsamixer controls 'Analog Input' and 'V_REFOUT'

2007-09-06 Thread Arjun Sarwal
Hi,

We are working on some audio driver issues. While we're at it, we also
thought about changing name of two Alsamixer controls for the purpose of
more clarity :


1. There is a control 'Analog Input' which when enabled essentially allows
us to switch to a DC coupling by shorting a coupling capacitor on the
motherboard. To the user, it simply allows one to put a DC signal into the
Mic input and thus switch to DC mode.
The proposal is to change the name to 'DC Mode Enable'


2. V_REFOUT : This is also a control in Alsamixer and essentially switches
ON the bias voltage required by the microphone.
The proposal is to change the name to 'Mic Enable'


I look forward to comments and feedback on the above two proposals.


thanks and regards,
Arjun

-- 
Arjun Sarwal ( [EMAIL PROTECTED] )
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Query regarding gtk.Adjustment

2007-09-12 Thread Arjun Sarwal
Hi ,

I need to make my gtk.HScale take up discrete values - 30,50,70. For the
associated gtk.Adjustment, what should my parameters ( step_incr, page_incr,
page_size) be ?
I tried a few different combinations but none seemed to have worked.

Code snippet :
self.adjustmentf = gtk.Adjustment(70, 30, 70 ,20, 20, 0.0)
self.adjustmentf.connect("value_changed", self.cb_page_sizef,
self.adjustmentf)
self._freq_range = gtk.HScale(self.adjustmentf)
self._freq_range.set_draw_value(False)
self._freq_range.set_update_policy(gtk.UPDATE_CONTINUOUS)
self._freq_range.set_size_request(120,15)


Somebody suggested for me to use gtk_set_scale_digits or something, but i
couldn't find any documentation on that.


thanks,
Arjun

-- 
Arjun Sarwal ( [EMAIL PROTECTED] )
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Tool-tip on a Combo Box

2007-09-13 Thread Arjun Sarwal
How do I add a tooltip to a Combobox in my activity toolbar ?

thanks,
Arjun

-- 
Arjun Sarwal ( [EMAIL PROTECTED] )
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Get involved - Measure Activity on the XO

2007-09-14 Thread Arjun Sarwal
Measure Activity on the XO
(The Activity which converts the XO into an oscilloscope, a spectrum
analyzer and a data logger !)


Release 9 of the Measure Activity (build  575 onwards) features an improved
UI and the following basic features -
* Apply an AC or DC signal into Mic_In port, or simply observe the sound
signal picked up from the Mic on the XO
* Watch the signal in time domain for frequency domain representation
* Toggle the bias voltage at the Mic_in port ON/OFF. This voltage is
required by many sensors.
* Log data at a specified interval, take a snapshot of the current waveform;
and draw a graph of the logged data too.



How can you help ?


(1) Help in software development of the activity. There are many refinements
and features that can further be added. I have put some of the priority ones
down as tickets in Trac. Have a look at #3435, #3437, #3438 and #3461.

(2) Do projects (and help document them ) around the Measure Activity. Ideas
ranging from building a low cost ECG system to a low cost intrusion alarm
system. I've built and tested two ideas illustrating the concept :
=>'A low cost intrusion alarm system' that makes use of a toy laser that I
powered from the USB and used a simple LDR (light dependent resistor)
connected to the MIC_IN. Switch on the bias, set the activity to DC mode;
observe the voltage change when the light path of laser upon the LDR is cut!

=>'Temperature' monitoring system that I made simply with an LM35 temp
sensor, and I powered the sensor from the USB port.


(3) Help develop content and curriculum around the Measure activity. Science
experiments, Physics concepts...being able to relate concepts with physical
phenomena through hands on experiments makes for great learning !
For example, kids can whistle into the mic and using the frequency domain
display mode in Measure, compare and learn about frequencies...


(4) Want to build a low cost science/physics/chemistry lab ? A tele-health
monitoring system ? Lots of possibilities to be explored. All new ideas
welcome!


(5) Help document such projects and other cool ideas . We would , in
probability, be going in for Makezine DIY style documentation of such
projects - with cool illustrations, photographs and explanation...




Get in touch with me at [EMAIL PROTECTED] for any details/clarifications.

Looking forward to great collaboration and support from the community.


sincerely,
Arjun

-- 
Arjun Sarwal ( [EMAIL PROTECTED] )
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] Get involved - Measure Activity on the XO

2007-09-14 Thread Arjun Sarwal
Forgot to put down these two links -

1. Source code at http://dev.laptop.org/git?p=projects/measure;a=summary
(You could git clone it like this: git clone
git://dev.laptop.org/projects/measure)
2. Wiki Page - http://wiki.laptop.org/go/Measure  (The peripherals would be
put up on this page in a day or two)

thanks,
Arjun


On 9/15/07, Arjun Sarwal <[EMAIL PROTECTED]> wrote:
>
> Measure Activity on the XO
> (The Activity which converts the XO into an oscilloscope, a spectrum
> analyzer and a data logger !)
>
>
> Release 9 of the Measure Activity (build  575 onwards) features an
> improved UI and the following basic features -
> * Apply an AC or DC signal into Mic_In port, or simply observe the sound
> signal picked up from the Mic on the XO
> * Watch the signal in time domain for frequency domain representation
> * Toggle the bias voltage at the Mic_in port ON/OFF. This voltage is
> required by many sensors.
> * Log data at a specified interval, take a snapshot of the current
> waveform; and draw a graph of the logged data too.
>
>
>
> How can you help ?
>
>
> (1) Help in software development of the activity. There are many
> refinements and features that can further be added. I have put some of the
> priority ones down as tickets in Trac. Have a look at #3435, #3437, #3438
> and #3461.
>
> (2) Do projects (and help document them ) around the Measure Activity.
> Ideas ranging from building a low cost ECG system to a low cost intrusion
> alarm system. I've built and tested two ideas illustrating the concept :
> =>'A low cost intrusion alarm system' that makes use of a toy laser that I
> powered from the USB and used a simple LDR (light dependent resistor)
> connected to the MIC_IN. Switch on the bias, set the activity to DC mode;
> observe the voltage change when the light path of laser upon the LDR is cut!
>
> =>'Temperature' monitoring system that I made simply with an LM35 temp
> sensor, and I powered the sensor from the USB port.
>
>
> (3) Help develop content and curriculum around the Measure activity.
> Science experiments, Physics concepts...being able to relate concepts with
> physical phenomena through hands on experiments makes for great learning !
> For example, kids can whistle into the mic and using the frequency domain
> display mode in Measure, compare and learn about frequencies...
>
>
> (4) Want to build a low cost science/physics/chemistry lab ? A tele-health
> monitoring system ? Lots of possibilities to be explored. All new ideas
> welcome!
>
>
> (5) Help document such projects and other cool ideas . We would , in
> probability, be going in for Makezine DIY style documentation of such
> projects - with cool illustrations, photographs and explanation...
>
>
>
>
> Get in touch with me at [EMAIL PROTECTED] for any details/clarifications.
>
> Looking forward to great collaboration and support from the community.
>
>
> sincerely,
> Arjun
>
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Journal integration design for Measure Activity

2007-10-21 Thread Arjun Sarwal
Eben/Tomeu/Marco ,

This is with reference to incorporation of a feature (a post TR3 feature ,
targeted at FRS) which requires some re-thinking into the design of Journal
Integration of Measure Activity and is also a good (and important)
opportunity to look into the  complete design of integration of Measure
Activity with the Journal. On IRC Tomeu suggested sending out this email to
discuss and finalize about the design.

The new feature is showing a list of logs made in the current logging
session. This would allow many logs to be associated with an Activity
session and one would be able to simultaneously display them for comparison.
A screen shot (screen shot is based on sample data and is more for  the
purpose of explaining the UI)  is here
http://dev.laptop.org/~arjs/Screenshot.jpg <http://dev.laptop.org/%7Earjs/>


This brings us to discuss about the following things -->

1) Since many logs are going to be associated with one logging session, what
is the best way to pack these log files and associate with the journal?
Should one make a .zip file of all the log files ?

2) There are other details associated with each logging session - like what
is the time interval of logging selected while the log was made etc. which I
have been writing down within each log file itself in the first few lines,
should I follow the same practice ?

3) It may also be possible that within a session of Measure, no logs be
made. However the user have selected some settings with which he/she was
making some measurements. For example DC/AC mode, gain setting and a  time
base setting etc. The user may want to resume such a session from the
journal. How should such details be handled ? Do I need to write them down
into a text file ?
The settings comprise of states of 3 toggle buttons and 2 sliders.

4) There is really no need for periodic saves in Measure. How should one
stop them ?

5) Tags and Description - How does one describe the tags and description
fields associated with each journal entry of the activity ? I currently see
them blank and would like to put in meaningful information there.


Many thanks,
Arjun

-- 
Arjun Sarwal ( [EMAIL PROTECTED] )
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Home view notification within Activity

2007-10-24 Thread Arjun Sarwal
Is there a way to know within my Activity when user switches to Home View ?

I'd like to make use of that notification to make my Activity free resources
as if it has become inactive and gone into the background, rather than
depending upon "notify::active", which I have observed gets emitted only
once another Activity has become active, and not before.

thanks,
Arjun

-- 
Arjun Sarwal <[EMAIL PROTECTED]>
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Notify active event firing

2007-10-29 Thread Arjun Sarwal
(have posted to devel but realized this query is more suitable for posting
on sugar)

Say I have Activity A and I then go to Home View and open Activity B. At
which point of opening of Activity B, does Activity A get to know that it is
a background activity (inactive Activity) ?
Is it immediately upon clicking the icon of Activity B ?

thanks,
Arjun

-- 
Arjun Sarwal <[EMAIL PROTECTED]>
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] Notify active event firing

2007-11-03 Thread Arjun Sarwal
Thanks, Tomeu.

I need to turn off some drawing code when the user switches to Home View
(why waste so much of CPU power in the meanwhile)
How can I do that ?

thanks,
Arjun

On 10/30/07, Tomeu Vizoso <[EMAIL PROTECTED]> wrote:
>
> Hi Arjun,
>
> On Tue, 2007-10-30 at 02:15 +0530, Arjun Sarwal wrote:
> > (have posted to devel but realized this query is more suitable for
> > posting on sugar)
> >
> > Say I have Activity A and I then go to Home View and open Activity B.
> > At which point of opening of Activity B, does Activity A get to know
> > that it is a background activity (inactive Activity) ?
> > Is it immediately upon clicking the icon of Activity B ?
>
> The 'active' property in Activity A will be set to False when the window
> of the Activity B opens (when the window manager tells the sugar shell
> than that window has popped up).
>
> Tomeu
>
>


-- 
Arjun Sarwal <[EMAIL PROTECTED]>
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Working on peripherals ?

2007-11-05 Thread Arjun Sarwal
Working on peripherals ? (Wanting to or) Building a science experiment kit
around the XO ? Or a tele-health module ? Love hardware hacking using the XO
? Have some cool ideas regarding peripherals ?

I'm compiling a small update of all peripherals people which I will send out
in a week's time on the relevant mailing lists. This is an opportunity for
you to share your cool ideas and work with the community, build connections
with other peripherals people and invite suggestions and feedback on your
work!

Please send me a brief update of  what you would like to share with the
community (please tell us a little about yourself too) - I will compile all
of these into a single email and send them out. It could also be a
collaboration request - for example you may be good at hardware but may
looking to collaborate with programming people for some peripherals
projects...


thanks and regards,
Arjun
( [EMAIL PROTECTED]or  [EMAIL PROTECTED] )

ps - please send your replies to me directly, avoid flooding the mailing
list with your reply; my whole purpose is to compile all of these updates in
a single email :-)


-- 
Arjun Sarwal
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] peripherals digest Vol 1

2007-11-14 Thread Arjun Sarwal
Hi all,

This is a (low frequency) compiled update of all peripherals related
developments of the community.


In this issue -


* [Message1] Meet  Nicholas who is focusing on designing interfaces to read
sensor values easily
* [Message2] Meet Elijah , a doctoral student in information science at
Indiana,  who is looking for people to collaborate on providing
hardware/arduino programming activity support on the XO
* [Message3] Meet Ian - chemistry hobbyist, electricity enthusiast,
Wikipedian, sustainability advocate, and student
* [Message4] Joel Stanley quickly needs to build some peripherals
* [Message5] Mary Lou's microscope
* [Message6] Peripherals wiki page
* [Message7] (Regular feature) Question for discussion


Message 1 -

Hi,
 I am currently working on the software framework to allow
easy analysis of data. Specifically, I am making a system for
representing both functions and buffer based (collected) graphs
on the same canvas and how to make them interact effectively.
I have also built a very primitive GUI. Hopefully I will combine
these by this weekend, so I can get hacking on various sensors.
The goal is then to provide pre-designed setups so that one can
e.g. click on the temperature probe, hit collect, and start getting
data. After that, along with refining the GUI, designing some
useful sensors is in the todo list. Finally, integration with the
camera and mic/speaker (for distance measurement) will be
added. This is a long term schedule -- for the next two weeks,
I would like to get the GUI and functional/buffer based graphs
(including regressions, etc) working. I have never used Gstreamer
before, so that is a hurdle that I am trying to cross (or, better yet,
avoid by using pyalsa...).
   While I would like to devote all my time to this project, that is
simply not possible, so I am working on it as much as I can. This
varies from week to week, but I should have a looser schedule
now than I did until mid/early December. If anybody is interested in
helping me work on this or wants to coordinate functions, they
can feel free to contact me at [EMAIL PROTECTED]


nick


Message 2 -

hi,

i am, hopefully, getting an iodata usb2rgb (usb vga dongle...) cable soon,
and will be devoting some of my OLPC time to that - probably mostly
integration work, so that we can hook olpc to other display hardware
(projectors, etc) when needed.

i'm also interested in working on integrating wiimote control with the XO.
again, a lot of that is integration work :-)  but it makes several
different kinds of sensors trivially available, modulo the availability of
a bluetooth dongle.

i'd love to work with someone on adding processing.org hardware / arduino
programming activity support to xo.  cool stuff, those projects are, and
pushing them together with OLPC is an interesting synergy.


--elijah



Message 3 -

Hi all,
My current projects include the various I/O devices for the XO, but my focus
is the TeleHealth Module. I am trying to design a peripheral, application,
and library for the XO to successfully bridge the "last-mile" gap between
the medical community and the children of the third-world. My work on the
activity still remains trivial at this point in time, as I am relatively new
to python. My work on the hardware is outlined in depth on the wiki page,
[[TeleHealth_Module]]. I am still working on obtaining the few remaining
components via samples, and am currently struggling to obtain an
oscilloscope and developer boards for my surface-mount components.

A bit about me: My heavy involvement in OLPC precipitated after I was
severely burned on my left hand by a plasma cutter. I have since learned
much about medical diagnosis technologies and protocols. I am a chemistry
hobbiest, electricity enthusiast, Wikipedian, sustainability advocate, and
student.  There's more to be said, but some of it is on my wikipedia user
page, [[User:ITxT]]
I look forwards to collaboration,

Ian Daniher



Message 4 -


(Joel would be presenting OLPC at an important conference soon - on the 20th
of November, Please help him with peripherals ideas and designs) Joel
says...

Hi,
I'm presenting OLPC at a big education conference in two weeks time
(nov 20th) and I'd like to demo some of the different bits that we
currently have.

[sugar] gobject idle_add signal and waiting in the main loop

2008-01-27 Thread Arjun Sarwal
Hi

In the code I am working on, upon a user generated event, queuing of a
gobject idle add is enabled that queues an idle add whenever I get new data
from the gstreamer pipeline.

a rough sequence of desired events is as follows -->


-user event generated
-enable gobject.idle_add to queue up data buffer upon receiving a "handoff"
signal from the gstreamer fakesink
-attempt to wait for 2/3 buffers to accumulate in the appropriate callback
functions
-disable gobject.idle_add  and disable the handoff signal
-process the data buffers



I need to wait in my main thread for a few of these buffers to acquire
before moving forward.  If I use time.sleep it seems to me that i stop
getting data buffers too. It may be that the handoff signal gets disabled
and/or the gobject.idle_add doesn't get invoked


I'm looking to use a different choice of either (a) time/wait or (b)
gobject.idle_add

Kindly let me know with suggestions to help me overcome this problem.


thanks
Arjun



-- 
Arjun Sarwal
<[EMAIL PROTECTED]>
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Using Matplotlib in Measure Activity

2008-01-31 Thread Arjun Sarwal
(my previous post didnt get posted it seems. If it did/does please
ignore this copy)

Hi,

For some time I have been thinking about extending the functionality
of Measure Activity into a tool that also allows for graphical
analysis of data acquired not just from sensors/mic but data acquired
from any source. For example this data can also be a set of values
entered manually or something acquired say as RGB values from the
camera. In this regard I am thinking upon two areas


(1) A standard format for data sets. For example this could be data
that the Distance Activity at a later stage logs as a set of distance
readings or a set of sensor values (which Measure already reads)etc.
At this point of time, I can think that data may represent information
about more than one dimension also, for example pixel values in a
picture taken from the mic.
Is there an already (standard) set of existing data formats or ways of
organizing and storing numbers that I can
adopt or should I just make up my own ?


(2) To allow for a variety of multiple views, representations and
basically allowing more control over the way data is represented, I am
considering using Matplotlib. See some screenshots here
http://matplotlib.sourceforge.net/screenshots.html

I still plan to explore this API a bit further, however does anyone
have any immediate thoughts on this ?
The main aspect being a comparison of the overheads of adding this
package on the XO vs the long term benefits of having such
functionality that other Activities can also make use of.


thanks in advance.
Arjun


--
Arjun Sarwal
<[EMAIL PROTECTED]>
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Using Matplotlib in Measure Activity

2008-01-31 Thread Arjun Sarwal
Hi,

For some time I have been thinking about extending the functionality
of Measure Activity into a tool that also allows for graphical
analysis of data acquired not just from sensors/mic but data acquired
from any source. For example this data can also be a set of values
entered manually or something acquired say as RGB values from the
camera. In this regard I am thinking upon two areas


(1) A standard format for data sets. For example this could be data
that the Distance Activity at a later stage logs as a set of distance
readings or a set of sensor values (which Measure already reads)etc.
At this point of time, I can think that data may represent information
about more than one dimension also, for example pixel values in a
picture taken from the mic.
Is there an already (standard) set of existing data formats that I can
adopt or should I just make up my own ?


(2) To allow for a variety of multiple views, representations and
basically allowing more control over the way data is represented, I am
considering using Matplotlib. See some screenshots here
http://matplotlib.sourceforge.net/screenshots.html

I still plan to explore this API a bit further, however does anyone
have any immediate thoughts on this ?
The main aspect being a comparison of the overheads of adding this
package on the XO vs the long term benefits of having such
functionality that other Activities can also make use of.


thanks in advance.
Arjun


-- 
Arjun Sarwal
<[EMAIL PROTECTED]>
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Matplotlib vs PyCha

2008-02-06 Thread Arjun Sarwal
Hi,

In continuation with my previous email[1] in which I had mentioned
that I was looking for python packages that would enable me to do
graphing/plotting of data in various formats. I searched through a
series of packages. One that I really liked was gtksheet (or
gtkextra?)[2]  which had various plotting functions (and also a
spreadsheet like interface, which I would eventually need) but there
hasn't been any development on that since a long time and that package
depends pygtk1 and python <<2.4 so it seems I can't use it.


After searching through more packages it seems to me that I have two options --

(A) PyCha [3]
Pros
* Very small package - 30KB. Just need to include these few python files [4]

Cons
* Very limited types of representations - just line, bar and pie chart
* For displaying it within a gtk window one needs to do some hackish
stuff. like making a cairo surface and cairo context and copying the
surface from within the python modules to the main program etc.


(B) Matplotlib [5]
Pros
* A __huge__ variety of display methods a large number of graphs, and
a large number of built in mathematical functions
* A large community develops on and/or around it. Quite well known.
* There is a well defined and supported method for embedding it in gtk

Cons
* Large size. Just the rpm is about 5MB. It requires python-dateutils
and pytz. The pytz rpm is another about 6MB



I am veering towards Matplotlib because it has some really amazing
functionality (see the screenshots page[4])

The solution to the large size could be that we fork the upstream
package by removing certain parts that we don't require. There are
things that we don't need. For example in the rpm that I downloaded I
noticed that we could remove the examples and also remove support for
other backends (just keep the gtk backend support)



Please give comments/feedback/suggestions that would help set a
direction for development.


thanks
Arjun

[1] http://lists.laptop.org/pipermail/sugar/2008-January/004211.html
[2] http://gtkextra.sourceforge.net/
[3] http://www.lorenzogil.com/projects/pycha/#Documentation
[4] http://www.lorenzogil.com/projects/pycha/browser/trunk/src
[5] http://matplotlib.sourceforge.net/screenshots.html
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] Matplotlib vs PyCha

2008-02-07 Thread Arjun Sarwal
>
> Seems like gtkextra has continued to be developed and was ported to
> gtk2. It is also packaged in F7:
>
> http://koji.fedoraproject.org/koji/packageinfo?packageID=1987
>
> But I think that doesn't include python bindings :/

Ah yes, I was talking about the python bindings. python-gtkextra or
something like that...


Arjun
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] Matplotlib vs PyCha

2008-02-07 Thread Arjun Sarwal
Interestingly pytz is actually just 600kB and not 6MB! It is wrongly
written here :)
http://rpm.pbone.net/index.php3/stat/4/idpl/5320110/com/pytz-2006p-2.fc7.noarch.rpm.html

So on the disk, after installation of python-matplotlib and pytz, the
total extra space taken was 7MB,

The examples are about 1.5MB in matplotlib, so taking those out should
further reduce things by 1.5MB


Arjun

On Feb 7, 2008 11:05 AM, Tomeu Vizoso <[EMAIL PROTECTED]> wrote:
> On Thu, 2008-02-07 at 02:20 -0500, Arjun Sarwal wrote:
> > Hi,
> >
> > In continuation with my previous email[1] in which I had mentioned
> > that I was looking for python packages that would enable me to do
> > graphing/plotting of data in various formats. I searched through a
> > series of packages. One that I really liked was gtksheet (or
> > gtkextra?)[2]  which had various plotting functions (and also a
> > spreadsheet like interface, which I would eventually need) but there
> > hasn't been any development on that since a long time and that package
> > depends pygtk1 and python <<2.4 so it seems I can't use it.
>
> Seems like gtkextra has continued to be developed and was ported to
> gtk2. It is also packaged in F7:
>
> http://koji.fedoraproject.org/koji/packageinfo?packageID=1987
>
> But I think that doesn't include python bindings :/
>
> If you decided to try, wrapping gtk widgets with pygtk uses to be quite
> straightforward. You could base those bindings on
>
> http://python-gtkextra.cvs.sourceforge.net/python-gtkextra/python-gtkextra2/
>
> I'm not sure we want this lib in the platform, so you would have to
> include all these pieces inside your activity bundle.
>
> Tomeu
>
>
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] On Matplotlib on the XO

2008-02-08 Thread Arjun Sarwal
Fernando, John,

 I do believe that something like Matplotlib would be very useful in
 the context of the various graphing/plotting functions that I was
 looking for doing. Measure captures electrical signals and also logs
 signal values at specified intervals.

 Graphical representation of both kinds of information can quite
 wonderfully be carried out using Matplotlib. The size (matplotlib and
 related dependencies, the only one that isn't already on the XO being
 pytz) issue is one that I had been thinking about, but I see you have
 put quite a lot of thought and work into that, so I guess we should be
 able to take care of that.

 Thinking a little further and discussing with the author of Acoustic
 Measure Activity (that calculates the distance between 2 XOs)-Benjamin
 Schwartz (cced here), we believe that the functionality of such a tool
 would extend to be useful for graphing/plotting any data -- be it
 generated from Measure or from Acoustic Measure Activity ( a log of
 distance recordings at various points of time) or any other Activity
 in the future.

 The general idea that emerges is that it'd be very useful to have a
 spreadsheet like interface which loads the csv file generated by say
 Measure or Acoustic Measure and one can subsequently, from within the
 spreadsheet interface, select data sets and generate various
 plots/graphs using matplotlib.

 I have also cced Manusheel Gupta here who is leading the efforts on
 the Spreadsheet Activity and I would like to see this conversation go
 further.

 best regards,
 Arjun

>
>
>
> > From: Ivan Krsti? <[EMAIL PROTECTED]>
> > Subject: Re: [sugar] On Matploblib for the XO
> > To: Fernando Perez <[EMAIL PROTECTED]>
> > Cc: John Hunter <[EMAIL PROTECTED]>, Sugar ml 
> > Message-ID:
> > <[EMAIL PROTECTED]>
> > Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
> >
> > Hi Fernando, John,
> >
> > I wanted to restart the discussion around Matplotlib, IPython, and the
> > entire scientific/mathematical environment idea on OLPC laptops. I
> > responded to the mail below previously, but I'm not sure what happened
> > after that.
> >
> > Arjun Sarwal, who is the author of the Measure activity that I
> > demonstrated at SciPy, has recently been looking into plotting
> > libraries for the XO, and (understandably) Matplotlib caught his eye.
> > Arjun and others -- I'm forwarding Fernando's original e-mail below
> > for your reference.
> >
> > I am in full support of the Matplotlib/sympy/IPython combo getting up
> > and running on the XO, on the way to an awesome complete sci/math
> > environment. I hope Fernando and John will still consider giving us a
> > hand.
> >
> > Thanks!
> >
> > Cheers,
> > Ivan.
> >
> >
> >
> > On Aug 19, 2007, at 10:38 PM, Fernando Perez wrote:
> > > In order to estimate the sizes one could expect to see with a
> > > matplotlib build for the OLPC, I tried to build it with only the GTK
> > > Cairo backend (though AGG still needs to be built for internal use,
> > > since it's everywhere) and then added GTKAgg as well.  These were the
> > > sizes I got:
> > >
> > > tlon[build]> d *.tgz
> > > /home/installers/src/scipy/matplotlib/build
> > > -rw-r--r-- 1 fperez 4674627 2007-08-19 19:43 mpl_cairo_only.tgz
> > > -rw-r--r-- 1 fperez 121 2007-08-19 20:25 mpl_with_gtkagg.tgz
> > >
> > > However, the Cairo backend is still not very mature and doesn't
> > > perform very well; in particular it lacks proper transparency support,
> > > so using GTK+Agg might be a better alternative.  These sizes are what
> > > I got from doing a build and quickly removing some obvious things (as
> > > well as deactivating support for Qt, Tk and WX).  It's quite likely
> > > that John might suggest how to trim it further, I was afraid of
> > > cutting things I shouldn't so I went in conservatively.
> > >
> > > John will correct me if I'm wrong, but I think that since you already
> > > ship a real GTK, the GTKAgg backend should work just fine.  Agg is
> > > very fast, has extremely high quality, and the GTKAgg backend is
> > > probably the most mature and widely tested one of all.  If 5.5 MB is
> > > an acceptable size for you, here are the numbers for the other pieces
> > > of the puzzle.
> > >
> > > For IPython:
> > >
> > > -rw-r--r-- 1 fperez 713456 2007-08-19 21:18
> > > ipython_installed_nodocs.tgz
> > > -rw-r--r-- 1 fperez 808717 2007-08-19 21:16 ipython_installed.tgz
&

Re: [sugar] On Matplotlib on the XO

2008-02-08 Thread Arjun Sarwal
Fernando, John,

I do believe that something like Matplotlib would be very useful in
the context of the various graphing/plotting functions that I was
looking for doing. Measure captures electrical signals and also logs
signal values at specified intervals.

Graphical representation of both kinds of information can quite
wonderfully be carried out using Matplotlib. The size (matplotlib and
related dependencies, the only one that isn't already on the XO being
pytz) issue is one that I had been thinking about, but I see you have
put quite a lot of thought and work into that, so I guess we should be
able to take care of that.

Thinking a little further and discussing with the author of Acoustic
Measure Activity (that calculates the distance between 2 XOs)-Benjamin
Schwartz (cced here), we believe that the functionality of such a tool
would extend to be useful for graphing/plotting any data -- be it
generated from Measure or from Acoustic Measure Activity ( a log of
distance recordings at various points of time) or any other Activity
in the future.

The general idea that emerges is that it'd be very useful to have a
spreadsheet like interface which loads the csv file generated by say
Measure or Acoustic Measure and one can subsequently, from within the
spreadsheet interface, select data sets and generate various
plots/graphs using matplotlib.

I have also cced Manusheel Gupta here who is leading the efforts on
the Spreadsheet Activity and I would like to see this conversation go
further.

best regards,
Arjun



> From: Ivan Krsti? <[EMAIL PROTECTED]>
> Subject: Re: [sugar] On Matploblib for the XO
> To: Fernando Perez <[EMAIL PROTECTED]>
> Cc: John Hunter <[EMAIL PROTECTED]>, Sugar ml 
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
>
> Hi Fernando, John,
>
> I wanted to restart the discussion around Matplotlib, IPython, and the
> entire scientific/mathematical environment idea on OLPC laptops. I
> responded to the mail below previously, but I'm not sure what happened
> after that.
>
> Arjun Sarwal, who is the author of the Measure activity that I
> demonstrated at SciPy, has recently been looking into plotting
> libraries for the XO, and (understandably) Matplotlib caught his eye.
> Arjun and others -- I'm forwarding Fernando's original e-mail below
> for your reference.
>
> I am in full support of the Matplotlib/sympy/IPython combo getting up
> and running on the XO, on the way to an awesome complete sci/math
> environment. I hope Fernando and John will still consider giving us a
> hand.
>
> Thanks!
>
> Cheers,
> Ivan.
>
>
>
> On Aug 19, 2007, at 10:38 PM, Fernando Perez wrote:
> > In order to estimate the sizes one could expect to see with a
> > matplotlib build for the OLPC, I tried to build it with only the GTK
> > Cairo backend (though AGG still needs to be built for internal use,
> > since it's everywhere) and then added GTKAgg as well.  These were the
> > sizes I got:
> >
> > tlon[build]> d *.tgz
> > /home/installers/src/scipy/matplotlib/build
> > -rw-r--r-- 1 fperez 4674627 2007-08-19 19:43 mpl_cairo_only.tgz
> > -rw-r--r-- 1 fperez 121 2007-08-19 20:25 mpl_with_gtkagg.tgz
> >
> > However, the Cairo backend is still not very mature and doesn't
> > perform very well; in particular it lacks proper transparency support,
> > so using GTK+Agg might be a better alternative.  These sizes are what
> > I got from doing a build and quickly removing some obvious things (as
> > well as deactivating support for Qt, Tk and WX).  It's quite likely
> > that John might suggest how to trim it further, I was afraid of
> > cutting things I shouldn't so I went in conservatively.
> >
> > John will correct me if I'm wrong, but I think that since you already
> > ship a real GTK, the GTKAgg backend should work just fine.  Agg is
> > very fast, has extremely high quality, and the GTKAgg backend is
> > probably the most mature and widely tested one of all.  If 5.5 MB is
> > an acceptable size for you, here are the numbers for the other pieces
> > of the puzzle.
> >
> > For IPython:
> >
> > -rw-r--r-- 1 fperez 713456 2007-08-19 21:18
> > ipython_installed_nodocs.tgz
> > -rw-r--r-- 1 fperez 808717 2007-08-19 21:16 ipython_installed.tgz
> >
> > IPython comes in at a bit under 1MB, keeping the source and HTML
> > manual but removing the PDF docs.  Removing the HTML manual saves
> > about 100k.
> >
> > As for sympy, I just installed it and tarred it:
> >
> > -rw-r--r--  1 fperez 1686428 2007-08-19 21:21 sympy_installed.tgz
> >
> > I'm not 

[sugar] controlling AGC of camera on the XO

2008-02-21 Thread Arjun Sarwal
I need to turn OFF the AGC of the camera on the XO within my Activity.


I have found some pieces of code which I think might be relevant

(A)
in
olpc-2.6/drivers/media/video/pwc/pwc-ctrl.c

int pwc_set_agc(struct pwc_device *pdev, int mode, int value)
{
char buf;
int ret;

if (mode)
buf = 0x0; /* auto */
else
buf = 0xff; /* fixed */

ret = SendControlMsg(SET_LUM_CTL, AGC_MODE_FORMATTER, 1);

if (!mode && ret >= 0) {
if (value < 0)
value = 0;
if (value > 0x)
value = 0x;
buf = (value >> 10) & 0x3F;
ret = SendControlMsg(SET_LUM_CTL, PRESET_AGC_FORMATTER, 1);
}
if (ret < 0)
return ret;
return 0;
}

and

(B)
in
olpc-2.6/drivers/media/video/pwc/pwc-v4l.c

 case V4L2_CID_AUTOGAIN:
ret = pwc_get_agc(pdev, &c->value);
if (ret<0)
return -EINVAL;
c->value = (c->value < 0)?1:0;





My questions are  :

(1) Am I poking in the right place ?
(2) How do I go about developing a python wrapper? for this ?


many thanks in advance.
Arjun
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] (Announcement) OLPC-Health mailing list

2008-03-11 Thread Arjun Sarwal
Announcing the setup of a separate mailing list for the OLPC Health
project. Please join the mailing list by going to
http://lists.laptop.org/listinfo/Health

* About the OLPC Health project
http://wiki.laptop.org/go/Health
http://wiki.laptop.org/go/Health/Vision
http://wiki.laptop.org/go/Health/People

* About the mailing list (from the Mailing list main page)
"Mailing list for discussions on the OLPC Health project. See
http://wiki.laptop.org/go/Health for more details on the various
existing projects, project proposals, volunteers, coordinators and
Advisers."


*Conference call coming up this Sunday, March16th, 1pm EST**
http://wiki.laptop.org/go/Health_meetings#March_16th.2C_2008
Please see agenda and modify if required!

Agenda (first pass)-
*  New participants in the project -- please welcome Nand, Tom
Boonsori, Adesina
* Walter Humberto joins us as an adviser. About Walter, see
http://faculty.washington.edu/wcurioso/
* Updates from Anna, Mika, Benjamin, Jennifer, Chris Leonard, Lia,
Drew...(anyone else, please add )
* Is this a good time to start actively recruiting volunteers for
health projects ?
* Health Jam!
* We need some sort of weekly boot-camp in which we can welcome
new participants and help them get integrated into the workflow of
Health projects
* Peru deployment -- What can we immediately deliver for the Peru
deployment and how can we collaborate?
* Volunteers needed for meeting minutes and meeting co-ordination
and organization!


Thanks
Arjun
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] Playing w/ Activity packs in build 702

2008-03-26 Thread Arjun Sarwal
 Bryan,

Thanks for the feedback.



>
> Minimal documentation for Starchart, Go, Measure, Jump, Implode,
> Connect. These are __great__ activities but it would be hard for a kid
> to get into them w/out having background knowledge. Our two schools will
> share a 128 kbps Internet connection so it will be harder for the kids
> to google for answers.
>


Im working on a document which I'd base off the Measure wiki page that could
be included on the XO (thus one can start doing things w/o having to look
for anything on the internet). Any suggestions on what topics to include
would be great.

thanks
Arjun
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] generate clean tone to speakers (first prototype of working EKG around the XO )

2008-04-01 Thread Arjun Sarwal
Tom,

>
> Arjun, could you suggest an activity that gives a good clean example of
> sending sound to the speakers? Thanks.
>
>
You could use gstreamer (the same package the measure uses to grab audio data)
to create a pipeline, a command line example is below which generates
a sine of 500Hz

 gst-launch-0.10 audiotestsrc wave=sine freq=500 ! audioconvert ! alsasink

In python you could create a pipeline and implement it similar lines
to that given in audiograb.py in the Measure code.


I think it is possible to generate tones using Csound too and perhaps
other Activities are doing it, but I'm not aware of them.


regards
Arjun

---
Arjun Sarwal
Intern at One Laptop per Child
<[EMAIL PROTECTED]>
http://laptop.org/
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] [Announcement]OLPC India conference call

2008-04-14 Thread Arjun Sarwal
Dear all

The OLPC India team is organizing a conference call on Friday, 18th
April at 5pmIST (730am EST)

The agenda for this conference call focuses on a discussion of the OLPC
Initiative in India and hopes to address some of the most common
concerns/questions of volunteers wanting to get involved in the efforts in
India.
The agenda is posted here.
http://wiki.laptop.org/go/OLPC_India/Conference_calls

More conference calls to follow in the coming weeks.

For all further queries, please get in touch with Amit Gognaa of the OLPC
India team, ( [EMAIL PROTECTED]) on or off list.

Call in number and access codes to follow in a few days.


regards
Arjun

note: for all further discusions please use the OLPC India mailing list (
http://lists.laptop.org/listinfo/India)
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] jumpy cursor problem and sugar issue

2008-04-27 Thread Arjun Sarwal
Bryan,

Similar issues were dominant at the India pilot too...

On Sun, Apr 27, 2008 at 5:20 PM, Bryan Berry <[EMAIL PROTECTED]> wrote:
> Day 3 of the pilots at Bishwamitra and Bashuki and couple of issues have
>  come up
>
>  1. We are having a lot of trouble w/ jumpy cursors. You know where the
>  touchpad behaves erratically. Is there an easy fix to this problem?
>
>  we are using build 703, MP machines, and firmware Q2d14. We have the
>  kids hold down the 4 corner buttons as recommended in the XO user guide
>  but that doesn't seem to consistently fix the problem.
>

I thought there was a fix in Update.1 for the jumpy mouse bug ?

Other than that, we had observed that the touchpad behaved differently
because many kids chose to use a larger/smaller area of their fingers.
Since this is a capacitive touchpad, perhaps that has got something to
do with the amount of finger area in contact, or the amount of
pressure that one puts (some kids chose to press harder and harder on
the touchpad when they couldn't seem to get the cursor under control)
?

>  Dust is an issue at the schools but that can't explain the high rate of
>  jumpy cursors. Please assist
>

We didn't find any direct relation with dust as such. Humidity, and
sweaty fingers, though, did seem to make things consistently
difficult.

>  Suggestions?
>
>  2. For future reference: In general the kids and teachers find it quite
>  confusing when they move the cursor to the corners of the screen and the
>  Sugar frame pops up. The kids have learned the top row keys very quickly
>  - faster than I thought - and they find the frame popping up quite
>  confusing. They have learned to use the frame button already.
>
>  pictures to come and a full write-up, I promise!

Looking forward!

Good luck.
Arjun

>
>  Bryan W. Berry
>  Systems Engineer
>  OLE Nepal, http://www.olenepal.org
>
>
>
>  _______
>  Devel mailing list
>  [EMAIL PROTECTED]
>  http://lists.laptop.org/listinfo/devel
>



-- 
Arjun Sarwal
Intern, One Laptop per Child
Email: [EMAIL PROTECTED]
IRC: arjs on irc.freenode.net in #olpc, #olpc-health, #sugar
Skype: arjunsarwal85
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] [OLPC library] Fw: Get involved - Measure Activity on the XO

2008-05-07 Thread Arjun Sarwal
Ray,

Thanks for your email,

As I see it I wasn't on cc on your reply so I am only seeing your
message now when I am reading the mailing lists email, sorry for that.

As a start I've put together this page (still needs more work) that
details on the Measure Activity what it is...etc
http://wiki.laptop.org/go/Measure

And the code work in progress is here
http://dev.laptop.org/git?p=projects/measure;a=tree;f=measure_stable;h=561325f7dc5e3ebdbe537bce54d062782e303cd9;hb=HEAD

The last release was made from here
http://dev.laptop.org/git?p=projects/measure;a=tree;f=measure_stable;h=be7ff4b83e543ab228eb62401bbd7a1a19215bfb;hb=854b9ef766670ea036554a46a0a7b21bd2eeb967

Some things I am aiming for the next release are here --
http://wiki.laptop.org/go/Measure/Plans

Please feel free to let me know what you think would be other useful
additions to Measure.

I get a little free 17th May onwards and I will  continue to spend a
few cycles on taking forward the work then, but in the meanwhile I'd
be glad to answer any questions you may have.

regards
Arjun

On Thu, May 1, 2008 at 4:48 AM, Ray Phoenix <[EMAIL PROTECTED]> wrote:
> Linda,
>
> Thanks for sending this on to me. I forgot I sent it from your email... :-)
>
> Arjun,
>
> I'm in the Seattle area, and would love to work with you on the OLPC. I have
> worked with python and unix, so I might be of some help. Let me know how we
> can best work together. Thanks,
>
> Ray
> [EMAIL PROTECTED]
> 206-708-1604
> 619-961-7390
>
>
> On Tue, Apr 29, 2008 at 1:11 PM, Linda Hill <[EMAIL PROTECTED]> wrote:
>
> >
> > - Original Message - From: "Arjun Sarwal" <[EMAIL PROTECTED]>
> > To: "Linda Hill" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>; "edward baafi" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> > Sent: Tuesday, April 29, 2008 11:17 AM
> > Subject: Re: [OLPC library] Get involved - Measure Activity on the XO
> >
> >
> >
> >
> >
> >
> > > Ray,
> > >
> > > Thanks for your message.
> > >
> > > As I understand, that you wish to connect multiple sensors to the USB
> > > based sensor board  and from the UI of your activity/application
> > > select which sensor to read from.
> > >
> > > Edward Baafi, cced here might be able to comment better on that since
> > > he's been most deeply involved in the programming of the USB based
> > > sensor board.
> > > It would be a matter of writing a simple python script that would
> > > involve making use of the pyusb python libraries.
> > >
> > > I would like to point out at this point that USB based sensor board
> > > support hasn't yet been incorporated into Measure yet, though I do
> > > have plans of doing that. Any help by anyone in this regard would be
> > > greatly welcome as I develop Measure from whatever free time I get
> > > from school studies.
> > >
> > > many thanks
> > > Arjun
> > >
> > > On Sat, Apr 19, 2008 at 3:51 PM, Linda Hill <[EMAIL PROTECTED]>
> wrote:
> > >
> > > >
> > > >
> > > > Arjun,
> > > >
> > > > I'm just getting started working with my XO, and I built a temperature
> > > > sensor with an LM35 chip. My intention is to have multiple sensors
> around
> > > > the house, and read each of them separately. I am puzzling over how
> best to
> > > > output a binary code to select which sensor I wish to read. I know
> that the
> > > > USB port and the USB card that is being designed (and produced?) will
> allow
> > > > me to communicate out from the XO, but is there some other way that
> I'm not
> > > > thinking of that could be used?
> > > >
> > > > I like it that I can get analog data into the XO so easily. Now I'd
> like to
> > > > know how to get digital data out effectively.
> > > >
> > > > Thanks,
> > > >
> > > > Ray Phoenix
> > > >
> > > >
> > > > ___
> > > >  Library mailing list
> > > >  [EMAIL PROTECTED]
> > > >  http://lists.laptop.org/listinfo/library
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Arjun Sarwal
> > > Intern, One Laptop per Child
> > > Email: [EMAIL PROTECTED]
> > > IRC: arjs on irc.freenode.net in #olpc, #olpc-health, #sugar
> > >
> > >
> > >
> >
> >
>
>
> ___
>  Library mailing list
>  [EMAIL PROTECTED]
>  http://lists.laptop.org/listinfo/library
>
>



-- 
Arjun Sarwal
http://dev.laptop.org/~arjs
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] jumpy cursor problem and sugar issue

2008-05-11 Thread Arjun Sarwal
On Sun, May 11, 2008 at 5:44 PM, Mikus Grinbergs <[EMAIL PROTECTED]> wrote:
>
>
> p.s.  When using the XO touchpad, a sure way to get erratic cursor
>  behavior is contacting its surface with two fingers (instead
>  of one).
>

And, I can confirm that this something _very_ commonly done by the kids.....


Arjun




-- 
Arjun Sarwal
http://dev.laptop.org/~arjs
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] TurtleArt, Logo, and XOs

2008-06-27 Thread Arjun Sarwal
On Fri, Jun 27, 2008 at 7:14 PM, Brian Silverman <[EMAIL PROTECTED]> wrote:
> hi
>
> sorry for the delay in responding... been busy.
>
>> I hear you don't have a recent XO!   Please add yourself to our
>> contributors database and we will send you a laptop asap : projectdb.olpc.at
>> <http://projectdb.olpc.at>
>
> thank you for this. I haven't added myself yet but plan on doing so in the
> coming weeks.
>
>> There's also the TurtleArt with Sensors project, which should probably be
>> merged back into the TurtleArt trunk -- you should talk to arjun sarwal
>> about this.
>>
>> http://wiki.laptop.org/go/Measure#Sensor_Input_into_Turtle_Art
>> http://wiki.laptop.org/go/Activities#Programming
>> http://wiki.laptop.org/go/Turtle_Art
>>
>
> Yes, we should talk about this. My preference, if possible, is to somehow
> keep the versions separate. As I'm sure you've noticed, the design aesthetic
> of TurtleArt is quite minimalist. There are a lot of possible additions that
> were "obvious" that I ignored anyway. Sensors are a really good idea.
> However, rather than viewing them as an extension  I'd prefer to view them
> as part of an alternative version.

Dear SJ, Brian :

Perhaps Turtle Art could then be the 'upstream version'  and I could
maintain the 'Turtle Art with Sensors' fork ..?

Thoughts ?

---


Dear Community:

I have been working on a modification of Turtle Art with sensors that
works better than the version that has gone in Peru Activity pack. The
earlier one needed me to do gstreamer Kungfu to get the samples of
sensors/sound. The new version uses python-alsaaudio. When
python-alsaaudio (#6535) is included in builds getting samples(AC/DC)
from ADC becomes much easier and straightforward.


Also, I have been working upon re organizing the pages associated with
Measure Activity and Sensors with the aim that there should be easily
accessible information for people who visit the page. For example
educators click straight away on the educators section, people who
want to 'hack around' have access to the appropriate links..etc.
A very rough outline here http://wiki.laptop.org/go/Measure/New_temp
We can replace the main Measure page
(http://wiki.laptop.org/go/Measure) once perhaps we can sufficiently


In particular it'd be great if someone could help in --
* pulling off all the content on Measure page or linked off the
Measure wiki page and re-organizing it in the new format
* giving feedback or helping in the  proposed topics/sections of the
re-organized page
* help add more activities / projects around Measure sensors or Turtle
Art with (though if one sees links off the Measure page, there are
already
* exporting a relevant page set to sugarlabs wiki



I hope to be doing a release soon of Measure Activity in a week or so.
It has been almost a few months late than I had planned it to be out.
I have been working on changes in the codebase that make it more
easily extensible (for example displaying more than one graphs, say
upto 5 while not letting update rate/frame rate drop too low). Other
changes that I have been working on are making it easier to read
values (in the previous version the calibrated values in terms of
voltage are not fully correct), adding support for more lower range
frequency signals to be displayed well (For example certain Health
peripheral projects are requiring to show as low as 10Hz signals)
In the future, I hope to release soon and more regularly with
incremental changes rather than a lot of changes and a long gap in
releases.




many thanks,
Arjun

ps -- Sorry for this 'mashed up' email consisting of a lot of topics,
I hope to follow up on separate specific topics in separate threads
soon...


>
> Brian
> p.s. - is the XO-2 real enough yet to start thinking about?
>



-- 
Arjun Sarwal
http://dev.laptop.org/~arjs
http://youtube.com/watch?v=SwcSEcfR464
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Best way to display scale ?

2008-06-29 Thread Arjun Sarwal
I was wondering if anyone could please suggest some good ways of
writing 'scale' within Measure Activity.

When a user sees a signal, I want him to be able to measure/view the
signal and compare it with other signals perhaps at different points
of time. For this the process that I see should happen is that the
user measures the divisions from the center line and multiplies it
with the scale.

There are a horizontal and vertical set of lines in the background
that form a grid.

Currently I am displaying the scale as
Scale::
X Axis: 1 division = x seconds
Y Axis: 1 division = y volts

The problem is that x and y are very small values. So it eventually
comes out as something
X Axis: 1 division =  0.125 seconds
Would 10 divisions = 1.25 seconds be any better ?

Alternatively, should I change the sampling rate and distance between
the grid lines to conform to something that gives whole numbers on the
right side.
For example
X Axis: 5 divisions = 1 second

etc.


Also, would a simple multiplication based text box be useful ? That
allows one to multiply the number of divisions by the scale to get the
final value that one is looking to measure ?



Thanks,
Arjun



-- 
Arjun Sarwal
http://dev.laptop.org/~arjs
http://youtube.com/watch?v=SwcSEcfR464
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Deleting journal entry

2008-08-21 Thread Arjun Sarwal
Hi,

I am  using the following piece of code from one of Sugar's files to
create a journal entry whenever a logging session (which is a set of
csv values) is created within Measure Activity.

Whenever user records a few values, a journal entry gets created. When
he choses to record a few more values another journal entry gets
created which is still basically pointing to the same file that has
been updated with few more values. How can I delete the previous
entry.

Just an overview of required steps would be good for me to start with.,..

Thanks a lot.
regards
Arjun


try:
jobject = datastore.create()
try:
jobject.metadata['title'] = _('Log values ' +
str(waveform_id) + ' ,from Measure Activity')
jobject.metadata['keep'] = '0'
jobject.metadata['buddies'] = ''
jobject.metadata['preview'] = ''
jobject.metadata['icon-color'] = profile.get_color().to_string()
jobject.metadata['mime_type'] = 'text/csv'
jobject.file_path = file_path
datastore.write(jobject)
finally:
jobject.destroy()
del jobject
finally:
os.remove(file_path)
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] Deleting journal entry

2008-08-21 Thread Arjun Sarwal
On Fri, Aug 22, 2008 at 12:08 AM, Arjun Sarwal <[EMAIL PROTECTED]> wrote:
> Hi,
>
> been updated with few more values. How can I delete the previous
> entry.

I meant to append with a question mark -- How can I delete the previous
entry ?


thanks
Arjun
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Measure Activity, release candidate version 19

2008-08-25 Thread Arjun Sarwal
Dear friends,

I have been working  this while to try and incorporate _some_ of the
great feedback that I get from users and from the field on Measure Activity.

I would like to share with you Measure Activity release candidate
version 19. Why I call this release candidate is because I would like
to have a round of testing and feedback spanning 2-3 weeks before I
can actually call it a 'release'. During this while I will also fix
some minor TODOs and minor bugs that I already have pending on my list
for this release.

http://dev.laptop.org/~arjs/Measure-19.xo
is the link for the bundle.
(Note: Measure has a minor problem with Update.2 builds because of the
change way the signals are fired to the Activity in Sugar as per
#7856. Measure-19 has been tested to be working fine on Build 708)


# Summary of this release

1- large change in code base, almost completely re-written
2-waveform draws in XO stroke color
3-context based UI. abstracts the user from complex and non-relevant
terms such as Bias voltage etc.
4-textbox in the bottom that shows scale , prompts about using the
activity, prompts the place to connect the sensor
5-time/fft mode  in sound context
6-a new even lower frequency mode that allows one to view signals as low as 20Hz
7-button to pause fast moving waveforms in Sound context
8 - Use 'Now' to capture the current waveform or select
30sec/2min/10min/30min intervals to select intervals at which the
sound waveforms will be saved.
9 - The waveforms as stored as 'png' pictures and the entry for each
recorded waveform appears in the journal. The pictures can be used by
kids as part of a documentation/report for example.
10-The sensors context has selection of voltage sensor/resistance
sensor; user doesn't have to deal with terms such as 'Bias voltage'
etc
11 - textbox in the bottom in the sensors context prompts where the
sensor is to be connected
12-in the sensor mode, logging implies that actual sensor values are
logged to a csv file. A journal entry is created after each logging
session. One can have multiple logging sessions. Open the log file
from the journal (preferable after quitting Measure).
This is because with sensors, actual values are of more use than
waveforms; since we are dealing with DC values
13- when the spreadsheet activity will be made, one can use the logged
values to draw various graphs over time. for example temparature at
1hr intervals over a period of a day etc.



# The details.



(1)  A huge change in the code base. It is almost as if the whole
Activity has been re-written. After the first time I wrote the code I
got huge feedback from many users. This allowed me to understand what
are the possible and most popular uses. It also allowed me to
enumerate a number of possible future expansions and feature
additions. So to be able to make the code extensible and for me to
expand it easily, I spent a lot of time on code design to rewrite many
portions of the code.
The difference in the code is visible from the seeing the
measure_devel folder which has RC ver 19 and measure_stable which is
version 18 in the git repository.
I also believe that
-audiograb.py
-journal.py
-drawwaveform.py
contain code that can be used/re-used for other Activities for sensor
grabbing/csv logging and waveform display purposes



* Context based UI to abstract the user to deal with terms such as
Bias voltage etc. The two most popular uses of the Activity have been
for sound purposes and for Sensor purposes. Hence two contexts in the
toolbar for 'Sound' and 'Sensors'

* The Toolbars and logging options etc both are designed to best suit
the needs of the 'Sound' or the 'Sensors' contexts. For example only
in the sound context it makes sense to see the FFTs, change the
frequency scale, pause a fast moving waveform etc while these
functions are irrelevant in the sensors context.

* A new even lower frequency mode in the sound context that was
requested by some people from Colombia who were doing ECG projects
using Measure Activity. This makes it possible to see a few complete
cycles of waveforms as low as 25Hz on the screen.

* Within the sound context one can
-capture the current waveform by pressing record while the 'Now'
option is selected
-take pictures of the waveform at a selected interval of 30 seconds/2
minutes/10 minutes/30 minutes
-stop the process of taking pictures of the waveforms when one is don

* The captured pictures of the waveform appear in the Journal and kids
can use those pictures to put them as part of a report in a Write
session etc.



# What are my TODOs for the next few steps --

* Gather feedback and testing results over the next 2-3 weeks. Fix
issues left for this release as outlined in my TODO list
http://dev.laptop.org/git?p=projects/measure;a=blob;f=measure_devel/TODO;h=66914b0049d40213a06c0058828ae7b15b0257e5;hb=4f24130c86805f1ce95d18546bbab08cdf395890

* Create a set of release notes for the Activity version 19

* Make test plans for this release

* Complete the migratio

[sugar] Measure Activity inclusion in Fructose

2008-08-31 Thread Arjun Sarwal
*  Short description of the features.

-Displays waveform of sound in real time
-Allows one to connect low cost sensors
-allows kids to connect with physical world and do a host of hands-on
activities that allow learning-by-doing
-health related peripherals such as ecg etc. is another area of
application where measure has been used in the past to display signals
/waveforms

* Screenshots or screencasts.
http://wiki.laptop.org/go/Image:Measure_1.png

* Are you willing to follow the Schedule?
Yes.

* System components the activity depends on.
-S/W -- no additional dependencies other than those that go in the
default build. Some of the important ones that Measure uses are
gstreamer, cairo, pango
-H/W -- strong dependence on the XO1s hardware to be able to connect
sensors (though other alternatives such as USB based hardware sensor
board can be explored for other hardware platforms)

* Maintainer and members of the developer team, wth links to a
User page on the wiki or their homepage on the web.
Arjun Sarwal , http://wiki.laptop.org/go/User:Arjs ,
http://dev.laptop.org/~arjs/

* Status of internationalization.
High percentage of translations done.

* Code repository.
http://dev.laptop.org/git?p=projects/measure;a=tree
-stable is where the stable release code is
-devel is development work

* Bug tracking system.
OLPC's trac

* Homepage.
http://wiki.laptop.org/go/Measure

* Additional notes:
-version 17 has been a tested version that has been in the builds and
activity packs
-version 18 is version 17 with additional bug fixes in light of 8.2
-757 release and changes there
-version 19 is the new version with a host of improvements and modifications
All versions are at
http://dev.laptop.org/~arjs/Measure-19.xo
http://dev.laptop.org/~arjs/Measure-18.xo etc.

* Additional notes 2
There is a huge involvement of the community in contributing learning
projects etc around Measure
see
http://wiki.laptop.org/go/Talk:Measure
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] related to #7856 and other Measure Activity Bugs

2008-09-03 Thread Arjun Sarwal
Hi,

I am getting reports that Measure is failing on 8.2-757

>From various reports I am able to gather that the only problem seems
to be that related to #7856. So can you please tell me --

* If there are any other problems that you are seeing in Measure (version 18
http://dev.laptop.org/~arjs/Measure-18.xo ) apart from the one
outlined in #7771 and #8179 (related to #7856)
* If the problem related to #7856 is a sugar related bug, or if the
Activity needs to do something differently
* Any pointers to solutions of the problems reported will be a big
help, and I would be glad to work on the required changes to solve the
issues!

Thanks a lot!

regards
Arjun

ps- Measure 19 has also been released that includes a host of features
and improvements based on feedback from community and field, but that
is perhaps a separate discussion! :)
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Duplicate bugs, related to Measure ?

2008-09-03 Thread Arjun Sarwal
#7467
#7771
#8179

I think the central issue is same in all of these and is related to #7856 ?

If someone can confirm I can close 2 of these 3.

Thanks!
Arjun
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Keep error

2008-09-07 Thread Arjun Sarwal
Hello,

When is a Keep error typically generated by Sugar ?

What should an Activity be doing to avoid it ?

Thanks
Arjun




-- 
Arjun Sarwal
http://dev.laptop.org/~arjs
http://youtube.com/watch?v=SwcSEcfR464
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Multiple branches and translation of strings - seeking suggestions for best practices

2008-09-22 Thread Arjun Sarwal
Hi,

For the Activity that I maintain,  I maintain two branches - devel and
stable. At the time of a release contents of devel=stable.

I am realizing that I am not implementing the best practice.

As time passes stable continues to remain the same while I do
development in devel. Thus devel becomes very divergent from stable.
This also causes a large amount of strings to remain untranslated
because stable is being translated and perhaps it doesnt make sense
(?) to translate devel until a release into stable is made.

So I want to ask,

1. Is there any use of maintaining such branches  ? Or should I have
just one development branch and 'tag' it at a release ?

2. If I do maintain such branches, should one undergo a cycle of
localization(Translation) after each release of code from devel branch
is made ?


Thanks in advance.
best,
Arjun
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] Measure Activity - proposal for inclusion in OLPC build

2008-09-22 Thread Arjun Sarwal
Hi,

I saw some emails go by regarding inclusion of Activities and since I
don't have access to a reliable internet connection these days, I am
going to share some thoughts. My apologies if they are out of sync
with the sequence of discussions on the topic.

I would like to propose Measure Activity to be included in the build.

This is becuse The Measure Activity, :

(1)  Allows kids to connect with their physical world.  And, do this
with a minimal cost and with low cost sensors.
(2)  Allows one to do a host of learning-by-doing experiments that
allow for learning by exploration and by 'actively constructing
situations and their environment'
(3)  Provides instant feedback (eg. make sound and see waveform) and
is also  a deeper exploratory and reflective tool (record sensor
values over an interval and use them in a project. After recording
sensor values they appear in the journal as a csv file)
(4)  Exposes the low-cost sensor and Analog-input functionality of the
laptop, that otherwise is not exposed by any other software/activity
(5)  Allows for a host of self-monitoring health related -peripherals.
A number of such low cost ECG/EKG peripherals have been designed and
implemented around the Activity. In order to allow such peripherals,
presence of such an Activity becomes imperative.
(6)  Has an active community following. Please see the Measure wiki
page, the pages linked off the main page and the Talk page to see the
huge number of projects documented, contributions and feedback from
the community.


The latest release (candidate) that I made two weeks back is 19 and its link is
http://dev.laptop.org/~arjs/Measure-19.xo


I have tested it in 8.2-759 and found it to be working fine


Although feature additions have been slow (and thoughtful) to the
Activity, I commit to continue to maintaining the Activity and follow
the release, translation schedules etc.


Suggestions/Criticism/Feedback welcome!


Thanks and best,
Arjun
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] [RELEASE] Measure 20

2008-09-25 Thread Arjun Sarwal
20
* Added license information

http://dev.laptop.org/~arjs/Measure-20.xo

Thanks,
Arjun
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] Another pass through some basic Activity test results

2008-09-26 Thread Arjun Sarwal
Hi,

2008/9/26 Gary C Martin <[EMAIL PROTECTED]>:
> Here's a set of basic Activity test results for build 8.2-763, hope the ASCI
> art doesn't get too mangled by the list server (need to view with a fixed
>Measure-20 . . - . x x x . x Doesn't sleep when Activity is in the
> background (eats 75% cpu). Can't seem to
> record anything. Keep error when


-- When Measure is in background and some other Activity comes in
foreground, then Measure releases sound device - you can record sound
using any other program/application. In this state Measure also
doesn't hog CPU.

-- For recording the waveforms, within 'Sound' in toolbar, if 'Now' is
selected  and the record button next to it is pressed, it will capture
the current displayed waveform. If you select an interval and then
press the record button, it will start saving waveforms at the
specified interval and the record button will change to a 'stop'
button. It will record a maximum of 10 waveforms.

You will be able to see the waveforms as picture files in the Journal


--For recording sensor values, within the 'Sensors' context , when one
presses the record button it will start writing the sensor values (of
the sensor connected at Analog Input) at the specified interval.
You can have multiple recording sessions,i.e. stop it and then resume
it and stop it again and resume it.

You can see the logged sensor values in the Journal.  They are saved
in csv format.
(I am waiting for the spreadsheet activity to come soon! :) )

Though, without a sensor you will either be seeing a value around
16000 if you are in 'resistive sensor mode' (which turns on internal
bias voltage) and -32768 if you are 'voltage sensor mode' (which turns
off internal bias voltage)




Lastly, thanks for the feedback, its really useful. It helped me
figure out a minor problem in sensor values recording (#8683) and I
released ver21 that corrects that!


Best,
Arjun
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] [RELEASE] Measure 21

2008-09-26 Thread Arjun Sarwal
21
* #8683 Fixed minor sensor logging problem
( http://dev.laptop.org/attachment/ticket/8683/8683.patch )
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] Feedback on Measure (was Re: Another pass through some basic Activity test results)

2008-09-28 Thread Arjun Sarwal
(have changed the subject line since we are drifting off topic from
the previous subject )

Hi,

On Sun, Sep 28, 2008 at 6:02 AM, Gary C Martin <[EMAIL PROTECTED]> wrote:
> On 26 Sep 2008, at 19:31, Arjun Sarwal wrote:
>
>> 2008/9/26 Gary C Martin <[EMAIL PROTECTED]>:
>>>
>>> Here's a set of basic Activity test results for build 8.2-763, hope the
>>> ASCI
>>> art doesn't get too mangled by the list server (need to view with a fixed
>>>  Measure-20 . . - . x x x . x Doesn't sleep when Activity is in the
>>>   background (eats 75% cpu). Can't seem
>>> to
>>>   record anything. Keep error when
>>
>> -- When Measure is in background and some other Activity comes in
>> foreground, then Measure releases sound device - you can record sound
>> using any other program/application. In this state Measure also
>> doesn't hog CPU.
>
> Just testing with Measure-21 and 8.2-765, yes I see this now. However
> switching to any of the Neighborhood/Group/Home views does not seem count as
> putting Measure into the background, it still consumes the cpu and claims
> the sound input device. I'm guessing this is a Sugar behaviour? Is this a
> bug or a feature (feels like a Sugar bug that would make the UI sluggish for
> no go reason)?

See #7856. Seems like a Sugar related issue to me. I had borrowed the
code and concept from Record activity, which now apparently uses some
other method to determine switch of view/context/activity.( I think
they detect whether one of the main gtk widgets is the topmost or not
etc. not sure) I should try exploring that. Any help on this would be
great.

>
>> -- For recording the waveforms, within 'Sound' in toolbar, if 'Now' is
>> selected  and the record button next to it is pressed, it will capture
>> the current displayed waveform. If you select an interval and then
>> press the record button, it will start saving waveforms at the
>> specified interval and the record button will change to a 'stop'
>> button. It will record a maximum of 10 waveforms.
>>
>> You will be able to see the waveforms as picture files in the Journal
>
> Ahhh, thanks Arjun, so that's where they go to. I was expecting some visual
> representation within Measure, perhaps like Record does, where there is a
> tray at the bottom of the screen, or Browse and its bookmark thumbnails.
>

Thats very much on my list for the next set of TODOs. I am however not
sure from the UI point of view where this tray could go, and where
this textbox could go...or if there is an alternate replacement for
both ?


> Is there a way to capture waveform images without the entire UI also
> appearing in the  screen shot?
>

There is and I thought about that. But then I figured that along with
the waveform one would also need to know things like, what was the
timebase scale when the waveform was being displayed, was it in time
mode or fft mode etc. So I took the whole screen shot that would also
have all other information included.

Maybe just the waveform area saved along with some meta-data stored in
the journal entry might be an idea to consider ?

>> --For recording sensor values, within the 'Sensors' context , when one
>> presses the record button it will start writing the sensor values (of
>> the sensor connected at Analog Input) at the specified interval.
>> You can have multiple recording sessions,i.e. stop it and then resume
>> it and stop it again and resume it.
>>
>> You can see the logged sensor values in the Journal.  They are saved
>> in csv format.
>> (I am waiting for the spreadsheet activity to come soon! :) )
>
> Thanks, I understand this now as well. I had not noticed that new entries
> were silently being entered in to the Journal. BTW: you can resume the CSV
> file and Write will display the list of values. I also tried copying the CSV
> to the clipboard, but it generated a blank clipboard icon and would not
> paste anywhere (probably a Sugar issue, the clipboard isn't very robust
> yet).
>

I tried that too. It didn't work - Write doesn't copy anything on the
clip-board if one is viewing a csv file. Seems like a bug?

> Some quick suggestions:
>
> - The "Start Recording" text could say "Start Recording to Journal", that
> would have pointed me to check in the Journal after clicking record.
>

Agreed, good idea.

> - The time section menu could say "Every 30 seconds", "Every 2 minutes" etc.
> Before you explained, I believed that the times were the duration of the
> sample to be recorded, not the interval between ea

Re: [sugar] Measure Activity inclusion in Fructose

2008-10-11 Thread Arjun Sarwal
Reposting as you had suggested Marco.

Many thanks!
Arjun

On Sun, Aug 31, 2008 at 2:58 PM, Arjun Sarwal <[EMAIL PROTECTED]> wrote:
>*  Short description of the features.
>
> -Displays waveform of sound in real time
> -Allows one to connect low cost sensors
> -allows kids to connect with physical world and do a host of hands-on
> activities that allow learning-by-doing
> -health related peripherals such as ecg etc. is another area of
> application where measure has been used in the past to display signals
> /waveforms
>
>* Screenshots or screencasts.
> http://wiki.laptop.org/go/Image:Measure_1.png
>
>* Are you willing to follow the Schedule?
> Yes.
>
>* System components the activity depends on.
> -S/W -- no additional dependencies other than those that go in the
> default build. Some of the important ones that Measure uses are
> gstreamer, cairo, pango
> -H/W -- dependence on the XO1s hardware to be able to connect
> sensors (though other alternatives such as USB based hardware sensor
> board can be explored for other hardware platforms)
>
>* Maintainer and members of the developer team, with links to a
> User page on the wiki or their homepage on the web.
> Arjun Sarwal , http://wiki.laptop.org/go/User:Arjs ,
> http://dev.laptop.org/~arjs/
>
>* Status of internationalization.
> High percentage of translations done.
>
>* Code repository.
> http://dev.laptop.org/git?p=projects/measure;a=tree
>
>
>* Bug tracking system.
> OLPC's trac
>
>* Homepage.
> http://wiki.laptop.org/go/Measure
>
> * Additional notes:
> -version 17 has been a tested version that has been in the builds and
> activity packs
>
> -version 21 is the newest version with a host of improvements and 
> modifications
> All versions are at
> http://dev.laptop.org/~arjs/Measure-21.xo
> http://dev.laptop.org/~arjs/Measure-17.xo etc.
>
> * Additional notes 2
> There is a huge involvement of the community in contributing learning
> projects etc around Measure
> see
> http://wiki.laptop.org/go/Talk:Measure
>



-- 
Arjun Sarwal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


[sugar] x11vnc and vncviewer for classroom

2008-11-22 Thread Arjun Sarwal
I ran x11vnc server on my Ubuntu desktop, used vncviewer from the XOs
to connect to the machine.
I have two XOs that I am testing it with. The performance seems
reasonable. Upon having a look I see that the screen on the XOs
refreshes once about every one second.

I was wondering if someone could comment on the performance when I
have about 30 X0s connected to the same ?


The idea is that in a classroom, teacher wants to have these
intermediate sessions where he just wants to explain to kids by doing
things on his screen - mainly go through specific pages of a pdf while
simultaneously explaining something orally. There are ~30 kids in the
classroom.

Also, any specific tweaks/settings that you could suggest for this scenario ?

All XOs and the computer are connected to an AP as of now.

Thanks!

-- 
Arjun Sarwal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar