Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 12:56
    chiefenne commented #684
  • 07:58
    cynthi8 edited #684
  • 07:18
    cynthi8 edited #684
  • 07:09
    cynthi8 opened #684
  • Apr 18 19:19
    bessman commented #179
  • Apr 17 17:18
    CloudyPadmal opened #70
  • Apr 17 16:23
    CloudyPadmal labeled #69
  • Apr 17 16:23
    CloudyPadmal opened #69
  • Apr 17 16:20

    CloudyPadmal on bootloader

    init: all module files added wi… (compare)

  • Apr 17 16:20
    CloudyPadmal closed #68
  • Apr 17 16:20
    CloudyPadmal assigned #68
  • Apr 17 16:20
    CloudyPadmal labeled #68
  • Apr 17 16:20
    CloudyPadmal opened #68
  • Apr 17 15:14
    CloudyPadmal milestoned #57
  • Apr 17 15:14
    CloudyPadmal labeled #57
  • Apr 17 15:14
    CloudyPadmal milestoned #53
  • Apr 17 15:14
    CloudyPadmal labeled #53
  • Apr 17 15:14
    CloudyPadmal labeled #56
  • Apr 17 15:14
    CloudyPadmal milestoned #56
  • Apr 17 15:13
    CloudyPadmal milestoned #46
Alexander Bessman
@bessman
@nkpro2000sr Yes, that's precisely the idea.
NAVEEN S R
@nkpro2000sr

@bessman Regarding Project 1: Add support for PSLab to sigrok

Is the aim of the project to create a python wrapper to call sigrok apis with its share library libsigrok (usign ctypes) ?

I don't know how to do the same in android.

Alexander Bessman
@bessman
sigrok provides Python and Java bindings. The idea is to use those.
NAVEEN S R
@nkpro2000sr

@bessman i got some errors while installing pysigrok.

currently i am happy to do project 2 .

Alexander Bessman
@bessman
@nkpro2000sr Great! I think doing it for just I2C is too small a project for GSoC though, so the proposal should also include refactoring the SPI and UART interfaces and doing the same for them.
NAVEEN S R
@nkpro2000sr
Ok, definitely i add these too. Thanks
Kartikay Sharma
@kartikaysharma01

There is currently an effort to create a common back end for instruments via sigrok, which is a step towards unifying the code base. We will also need a common back end for things sigrok does not provide, such as the board's serial buses (UART, I2C, SPI). This back end should use libserialport (which sigrok also uses) in order to limit the number of dependencies.

Above these layers, we need higher-level functionality and specific sensor implementations. We don't have the resources to implement and support a large number of sensors ourselves, so this layer should be written in a language for which there already exists a large number of sensor libraries. That means Python, or possibly C++.

@bessman Once we are done with sigrok integration, what will the project structure look like?
This is what I had in mind

Mario Behling
@mariobehling
@kartikaysharma01 Please drag and drop images into this chat here directly.
Kartikay Sharma
@kartikaysharma01
Pslab flow.jpg
Kartikay Sharma
@kartikaysharma01
For the external sensors (such as moisture and temperature sensor), the support can be provided through sigrok i believe. Is that something we have considered?
CyReVolt
@CyReVolt:matrix.org
[m]
Ah, one final thing: Please also try connecting the PSLab device before starting the app. It doesn't work for me currently when running the app first. That bridging approach is a little fragile and I'll see what I can do to rework it - which is necessary for newer versions of Electron anyway, as it seems. 😩
4 replies
Alexander Bessman
@bessman
back end arch.png
12 replies
@kartikaysharma01 Here's how I imagine the project architecture after moving to sigrok.
pslab-python and pslab-android in this figure are much smaller beasts than they are today, with as much of the instrument code as possible having been moved to sigrok.
Alexander Bessman
@bessman
Regarding using sigrok as a back end for sensors, I do not think sigrok supports the type of sensors that can be used together with PSLab. Sigrok supports standalone devices like https://sigrok.org/wiki/APPA_55II, while PSLab communicates with sensors over I2C, SPI, UART, or directly on analog/digital inputs.
Kartikay Sharma
@kartikaysharma01

Please review my draft GSoC Proposal : https://docs.google.com/document/d/1TFl1_0obrcRcIAG2SFgEq36CL2SnedAhGIj1hxcfLwY/edit?usp=sharing

@mariobehling @bessman @CyReVolt:matrix.org @nielek2 Any suggestion with the timeline or any other area of improvement?

CyReVolt
@CyReVolt:matrix.org
[m]
(... just saw that I wrongly declared Electron as a dependency there and can remove it now; I had built from source before we had CI set up to build, so it's a legacy thing)
Mario Behling
@mariobehling
@CloudyPadmal Please upload the latest version of the hardware to the repo, if possible. If it is not ready yet maybe share a temp version link elsewhere. I would like to invite @RafaelLeeImg to review and give feedback. What do you think?
1 reply
NAVEEN S R
@nkpro2000sr

Please review my GSoC proposal.
https://docs.google.com/document/d/14flk591eItsGqA1Big6lFZIgr7xAcaPTL2S98CGU208/edit?usp=sharing

and please reply for any suggestions.
@bessman @mariobehling

Alexander Bessman
@bessman
@kartikaysharma01 Your timeline is quite ambitious. I think you be underestimating the amount of work required to reimplement the instruments in C.
You have "Implement a new backend that uses sigrok as a dependency" as part of your timeline. In my view, sigrok is the new backend.
2 replies
@nkpro2000sr Looks good to me :thumbsup:
Mario Behling
@mariobehling
@bessman @kartikaysharma01 Maybe mark in the doc what would be minimum version and max version. We do not have to exactly stick to every single thing outlined in the proposals. It gives us a general idea. What we are looking for are contributors who are continuously fully dedicated to the project over the summer and do not take on other commitments preferably. Ambitious is good, but make relevant contributions before in order to show that you can solve at least the minimum of what you mention in your proposal.
CyReVolt
@CyReVolt:matrix.org
[m]
Yes, this environment there is definitely not available to the globally installed app. Clicking the app icon can only look things up in your system.
Before setting PYTHONPATH, see what it currently points to; just echo $PYTHONPATH
Christian Voigt
@chrvoigt

@CyReVolt:matrix.org I did some digging …

Unfortunately setting PYTHONPATH in .bash_profile didn’t work, good thing is it explained why not … according to stackoverfow friends, basically the issues is that on OS X, command line applications and GUI applications are treated differently.
“Note that you may see here and there recommendations to either put environment variable definitions in ~/.bashrc or always launch login shells in terminals. Both are bad ideas. The most common problem with either of these ideas is that your environment variables will only be set in programs launched via the terminal, not in programs started directly with an icon or menu or keyboard shortcut.”
https://superuser.com/questions/183870/difference-between-bashrc-and-bash-profile

then I tried the ‘ setenv variable value’ in ~/Library/LaunchAgents/environment.plist
https://stackoverflow.com/questions/25385934/setting-environment-variables-via-launchd-conf-no-longer-works-in-os-x-yosemite?noredirect=1&lq=1

But apparently this is quite specific to several Mac Versions (I have Mojave 10.14 and earlier versions require edits in /etc/launchd.conf )

There are tools I can check out, though I am not sure it’s a practical approach, especially if it changes with macOS versions. One tool I found accidentially is this one https://github.com/ersiner/osx-env-sync

Maybe the most pragmatic solution is to say ‘you need to open PSLab from the cmd line’.

one question (to be safe) PYTHONPATH is to make the PSLAB files findable so they can be imported, correct? So at the moment I just point to the pip folder
/usr/local/lib/python3.9/site-packages/pslab
with the usual PSLab files, e.g. 99-pslab.rules, bus, instrument, sciencelab.py etc

So in general, if we can limit it to a two step process (a) pip install pslab + (b) download the .app
That would be a good installation, fiddling with setup files probably not ..

What do you think - should we just stick to the start from the cmd line approach?

2 replies
CyReVolt
@CyReVolt:matrix.org
[m]
We could still suggest people to attempt launching from their terminal if clicking the icon didn't work. They would have used their commandline shell to install then Python module anyway.
I'd say let's add that to the docs. My point is that if we default to launching from command line, this could cause trouble again. So here's another idea: Can you figure out the system lookup path for Python on macOS? Does it ship with Python 3 anyway, i.e., is there /usr/bin/python[3] and /usr/bin/pip[3]?
Christian Voigt
@chrvoigt
yes definitely - if ppl do 'brew install python' they get what you point out .. just that I need multiple python versions for different IDEs hence my set-up is more messy than the average
Christian Voigt
@chrvoigt

… just testing the process on a non-dev laptop where you get out of the box

  • Python 2.7
  • no pip
  • no brew
    what I think an average user could still manage
  • I went with the python installer ver 3.9 from python.org => Calling python still gets you 2.7 ; python3 and pip3 are good to go;
    ‘which python3’ points you to /Library/Frameworks/Python.framework/Version/3.9 … etc
  • pip3 install pslab .. installs automatically in that framework, so starting python3 and importing pslab works
  • However, without any tinkering - when launching the app via icon or from the terminal, it wouldn’t connect with the device …

So maybe we have to ‘educate’ the average user :-)

4 replies
oops the bold letters weren't intentionally used
or the Homebrew formula .. but until we have that, it's good to know what works
Mario Behling
@mariobehling
@Freddiscr_gitlab Hi, great to see you here. I added the Open Spectrometer topic to the meeting notes for Saturday. Could you help your friend to join this channel as well, please?
CyReVolt
@CyReVolt:matrix.org
[m]
Here's an interesting story I heard from Dave on The Amp Hour: A project, 9 months in, switched from a PIC32 to an ST Arm MCU, and 3 weeks later, they had a working prototype again, and they were able to port quite some C code. Is anyone else following the podcast? I can recommend it. :)
Frederik Schroeder
@Freddiscr_gitlab
:point_up: 14. April 2021 20:12 Hi, yes, I'm going to introduce him to this platform
CyReVolt
@CyReVolt:matrix.org
[m]
I received the breakout board from Esben today :)
4 replies
Mario Behling
@mariobehling
@CyReVolt:matrix.org Cool. So, we also need the sensor. Do you know what is the best place to order it?
CyReVolt
@CyReVolt:matrix.org
[m]
I will see what I can find, not from the top of my head. I'm an aspiring AliExpress Diamond Member. Usually it takes a month to get things from China. :-)
Anisha_Singh0118
@AnishaSingh0118
Hello everyone, this is Anisha Singh not a Gsoc participant but I always wanted to get involved with fossasia, and I enjoy making apps as I am comfortable with java and kotlin. Through this message I wanted to ask that I want to apply for fossasia's internship Can anyone guide me how can I do so?
it is mentioned in the form that for this program they particularly looking for developers who are already active in the community or have made prior contributions, but this is my first time contributing to it.
And also i dont have GSoC proposal can i still participate?
Mario Behling
@mariobehling
@AnishaSingh0118 Yes, please join. You can get involved step by step and learn about the project. Once you are familiar with it and have some merged PR we can discuss the steps to an internship.
Andreas Ennemoser
@chiefenne
Can anyone help me to connect PSLab on a MAC. I installed the desktop app which runs fine. I also installed the Python library. When I connect PSLab via a USB cable and then start the desktop app, it says "no device connected". I validated the correct installation of the Python library with the script given in the docs (psl.multimeter.measure_capacitance() ...). This worked fine. But the device does still not show up in the desktop app. Any thoughts?
Christian Voigt
@chrvoigt
@chiefenne you could start it from the command line $ open /Applications/PSLab-Desktop.app .. just make sure to connect the device first
Andreas Ennemoser
@chiefenne

@chiefenne you could start it from the command line $ open /Applications/PSLab-Desktop.app .. just make sure to connect the device first

Thank you very much. This worked. Hopefully I remember this hack ;) Would be cool if it works also by starting the app normally.

Erin Cold
@cynthi8
@CyReVolt:matrix.org Yeah, I would love to get the desktop app on the latest dependencies! What interop issues are there with Electron 12?
CyReVolt
@CyReVolt:matrix.org
[m]
@cynthi8: something with require not being available in the windows by default. I had a brief look, but couldn't figure it out exactly. We may need to rework the electron-load-balancer module. My suggestion is to spawn an org on npmjs.com for fossasia and put it there. Then we can publish our own @fossasia/electron-load-balancer as needed. WDYT?
Erin Cold
@cynthi8
@chrvoigt @chiefenne I raised a bug report - fossasia/pslab-desktop#684 - to be a more permanent reference for now. I'm not sure what the final conclusion was besides the workaround, so if you have any more information to add, please do so!
Erin Cold
@cynthi8

@CyReVolt:matrix.org Hmm ok that's strange, I'll take a look at updating myself. Do you think we need to rework the electron-load-balancer because of changes in Electron 12?

If so, I think it might be simpler to migrate away from electron-load-balancer to Web Workers rather than maintain another module.

2 replies
Christian Voigt
@chrvoigt
@cynthi8 thanks for raising the bug in Github .. I see you are discussing things with Daniel - so all is fine :-) I am not 100% sure it's specific to Macs only since Daniel W. had similar issue on Ubuntu. Anyway, happy to test new solutions on standard Mac systems if needed ...