Go to advanced search

by enedil
Mon Jan 04, 2016 6:45 pm
Forum: Python
Topic: Detect keypress using Python
Replies: 8
Views: 55544

Re: Detect keypress using Python

by enedil
Mon Jan 04, 2016 2:43 pm
Forum: C/C++
Topic: GPIO and serial IF programming with C language
Replies: 3
Views: 824

Re: GPIO and serial IF programming with C language

Try with this - without redundant overhead:
http://www.pieter-jan.com/node/15
by enedil
Sun Jan 03, 2016 6:25 pm
Forum: Python
Topic: ImportError: cannont import name 'IncompleteRead'
Replies: 1
Views: 424

Re: ImportError: cannont import name 'IncompleteRead'

Try

Code: Select all

sudo apt-get remove python3-pip
easy_install-3.5 pip
If there's no "easy_install-3.5", use that which matches your Python version.
by enedil
Sun Jan 03, 2016 6:18 pm
Forum: Python
Topic: hcm5883l split the data
Replies: 9
Views: 1166

Re: hcm5883l split the data

If that's a string, you can use split:

Code: Select all

list(map(lambda p: float(p.split(' ')[1]), string.split('\n')))
by enedil
Sat Jan 02, 2016 2:42 pm
Forum: Python
Topic: Calling app from within app
Replies: 4
Views: 871

Re: Calling app from within app

Of course it is possible. But if the latter one is made with Python too, you could create module with it:
https://docs.python.org/3/tutorial/modules.html
by enedil
Sat Oct 10, 2015 7:11 pm
Forum: Other programming languages
Topic: Posting a data on a Html page
Replies: 5
Views: 1093

Re: Posting a data on a Html page

I would set up a Ruby Sinatra or NodeJS micro-service, that posts the data in processed form.
How do you collect the data?
Which programming language?
by enedil
Sat Oct 10, 2015 7:05 pm
Forum: Other programming languages
Topic: LISP on RPI?
Replies: 6
Views: 1600

Re: LISP on RPI?

sudo apt-get install clisp #? is that not lisp I've done that too, I was just curious if their was any fix for CCL because a lot of people seem to have chosen CCL for speed and efficiency. It looks like SBCL can be a compiler of choice for a big chunk of Common LISP community that is fast and produ...
by enedil
Sat Oct 10, 2015 7:01 pm
Forum: General programming discussion
Topic: Best way to get code onto pi
Replies: 3
Views: 1003

Re: Best way to get code onto pi

Maybe setup a Git server?
Give Gogs a try. You can leave it working on your Pi, and just sync changes on your desktop.
by enedil
Wed Aug 26, 2015 10:33 pm
Forum: General programming discussion
Topic: What Language to Use?
Replies: 1
Views: 628

Re: What Language to Use?

You mean a controller for your already built car, eh?

Go with Python.
Even though I'm a strong advocate of Ruby. It makes no sense to learn a new language for the sake of learning.
by enedil
Wed Aug 26, 2015 10:31 pm
Forum: Polski
Topic: Analogowe piny GPIO ?
Replies: 1
Views: 1922

Re: Analogowe piny GPIO ?

A kto wie?
Ale, skoro PRi idze do przodu, to czemu miałoby się cofać?
by enedil
Thu Aug 20, 2015 10:35 am
Forum: Other programming languages
Topic: Announcing 8th for the Raspberry Pi!
Replies: 20
Views: 3075

Re: Announcing 8th for the Raspberry Pi!

Apart from the points raised before, which can be shorten to
Image,

where are the Docs?
by enedil
Thu Aug 13, 2015 10:04 am
Forum: C/C++
Topic: Talking between Programs
Replies: 6
Views: 1673

Re: Talking between Programs

Thanks for the replies Dougie and Enedil, I tried installing Mosquitto on the RPI2 model B and there's some dependency errors, apparently something called "squeeze" isn't supported? I think what I'm after is a kind of websocket. As Enedil suggested, a TCP websocket seems to be the easiest. Are ther...
by enedil
Tue Aug 11, 2015 8:10 pm
Forum: General discussion
Topic: best choice language and IDE for raspberry app
Replies: 8
Views: 1823

Re: best choice language and IDE for raspberry app

abcdcadb wrote:I'm worry that it isn't enough popular to develop later.
If a programming language is not the most popular one (like Java), it does not mean it is not popular at all.
Almost every programming language that runs flawlessly on Unix supports sockets.
by enedil
Tue Aug 11, 2015 7:58 pm
Forum: Other programming languages
Topic: posting sensor data to Rails app
Replies: 7
Views: 1829

Re: posting sensor data to Rails app

The Ruby version may look simpler but: I presume that "puts" in Ruby hangs everything up until it has completed. A bit of a pain if you want to be doing other things at the same time. Correct me if I'm wrong. I don't see any possibility for error checking in that example. Not quite true - puts just...
by enedil
Tue Aug 11, 2015 2:27 pm
Forum: Other programming languages
Topic: posting sensor data to Rails app
Replies: 7
Views: 1829

Re: posting sensor data to Rails app

Certainly curl is a great tool that any one messing with web protocols should know about. Our poster did say "Preferably using ruby or javascript" though. Of course this can also be done easily in Python or Perl etc. Less easily in C/C++. I noted it. I think RheShaGan said it since (s)he is not awa...
by enedil
Tue Aug 11, 2015 12:15 am
Forum: Other programming languages
Topic: posting sensor data to Rails app
Replies: 7
Views: 1829

Re: posting sensor data to Rails app

Use the power of Shell!
Curl comes to mind:
http://superuser.com/questions/149329/w ... st-request
No need to write a wrapper code.

Get curl with apt:
sudo apt-get install curl
by enedil
Tue Aug 11, 2015 12:08 am
Forum: C/C++
Topic: Talking between Programs
Replies: 6
Views: 1673

Re: Talking between Programs

Just set up TCP sockets.
by enedil
Wed Jul 29, 2015 10:08 am
Forum: Python
Topic: Datalogging
Replies: 6
Views: 1185

Re: Datalogging

Why not using syslog?
by enedil
Sat Jun 13, 2015 10:51 pm
Forum: General programming discussion
Topic: Web Development on the Pi
Replies: 12
Views: 15949

Re: Web Development on the Pi

Get GitHub Atom.
by enedil
Sat Mar 21, 2015 3:32 pm
Forum: C/C++
Topic: exporting from c# to excel
Replies: 6
Views: 1452

Re: exporting from c# to excel

It is C#. It runs on .NET virtual machine. It doesn't contain CPU-specific code.
by enedil
Sat Mar 21, 2015 3:30 pm
Forum: General discussion
Topic: Service for RPi Only
Replies: 26
Views: 3244

Re: Service for RPi Only

It doesn't matter. Since it is a web service, user can input fake data and you can't verify it.
by enedil
Fri Mar 20, 2015 6:48 am
Forum: Other programming languages
Topic: New way to write RPi apps
Replies: 1
Views: 769

New way to write RPi apps

Hi!

I just found that project:
http://artoo.io/documentation/platforms/raspberry-pi/
It's an easy way to write apps for devices (including Raspi) in Ruby. If you look at the bottom of the site, there are 2 links to similar frameworks for JavaScript and Go.
by enedil
Thu Mar 19, 2015 7:08 pm
Forum: Networking and servers
Topic: Web based user interface
Replies: 13
Views: 4641

Re: Web based user interface

RogerW wrote:Thanks for that. Websockets do look interesting. Google seems to bring up several references to Python implementations. Is there a prefered one for use in the server?

Roger Woollett
I meant https://github.com/joewalnes/websocketd
by enedil
Thu Mar 19, 2015 2:19 pm
Forum: Networking and servers
Topic: Web based user interface
Replies: 13
Views: 4641

Re: Web based user interface

Use Websocketd. Easy to use, language-agnostic.
by enedil
Wed Mar 18, 2015 8:42 pm
Forum: C/C++
Topic: X11 programming?
Replies: 24
Views: 4350

Re: X11 programming?

Generally, bad idea.

Learning straight X11 toolkit is time-consuming. Wayland is knocking Open Source's door.

Go to advanced search