Go to advanced search

by California
Sat Mar 09, 2019 9:59 pm
Forum: Networking and servers
Topic: How to set static IP addres on Raspbian Strech full
Replies: 4
Views: 989

Re: How to set static IP addres on Raspbian Strech full

Thanks, it works ok. It was done by manual from link above.

Regards, Vlado
by California
Sat Mar 09, 2019 7:35 pm
Forum: Networking and servers
Topic: How to set static IP addres on Raspbian Strech full
Replies: 4
Views: 989

How to set static IP addres on Raspbian Strech full

Hello, I want to set static IP address (for example) 192.168.1.28 on my Pi3B. Following some web links gave no results for me.
https://linuxconfig.org/how-to-setup-a- ... bian-linux
Regards,
by California
Sat Feb 16, 2019 1:25 pm
Forum: Python
Topic: Converting python 2.7 code to python 3.4
Replies: 11
Views: 671

Re: Converting python 2.7 code to python 3.4

Thanks, got solution in code below: def convert_MICROCHIP_32bit_to_float(x): if x == 0: x = 1231459733 x_hex = format(x, 'x') bits = bin(int(x_hex, 16))[2:].zfill(len(x_hex) * 4) i = 0 val = " ".encode() b_s = list(val) for char in bits: current_bit = int(char) if current_bit == 1: if i < 8: b_s[i +...
by California
Sat Feb 09, 2019 4:25 pm
Forum: Python
Topic: Converting python 2.7 code to python 3.4
Replies: 11
Views: 671

Re: Converting python 2.7 code to python 3.4

Thanks, one step more: def convert_MICROCHIP_32bit_to_float(x): if x == 0: x = 1231459733 x_hex = format(x, 'x') bits = bin(int(x_hex, 16))[2:].zfill(len(x_hex) * 4) i = 0 val = " ".encode() b_s = list(val) for char in bits: current_bit = int(char) if current_bit == 1: if i < 8: b_s[i + 1] = "1" eli...
by California
Sat Feb 09, 2019 1:06 pm
Forum: Python
Topic: Converting python 2.7 code to python 3.4
Replies: 11
Views: 671

Re: Converting python 2.7 code to python 3.4

Thanks, below is solutionfor that part of the code: readBuffer = array.array('i') readCount = 0 while readCount < maxReadCount: readBuffer.append(ord(ser.read(1))) readCount = readCount + 1 i = 0 while i < maxReadCount: val = readBuffer[i] if i == 4: power_situation = int(val) i = i + 1 but new isss...
by California
Sat Feb 09, 2019 10:33 am
Forum: Python
Topic: Converting python 2.7 code to python 3.4
Replies: 11
Views: 671

Re: Converting python 2.7 code to python 3.4

Thanks for the reply. Next step of convertion: readBuffer = array.array('b') readCount = 0 while readCount < maxReadCount: readBuffer.append(ser.read(1)) readCount = readCount + 1 i = 0 gives an error readBuffer.append(ser.read(1)) TypeError: an integer is required (got type bytes) Any help Regards ...
by California
Mon Feb 04, 2019 3:58 pm
Forum: Python
Topic: Converting python 2.7 code to python 3.4
Replies: 11
Views: 671

Converting python 2.7 code to python 3.4

Dear all, below is part of the working code for RS485 communication between PC and Microchip PIC18F458 deweloped in python 2.7. I woul like to move to python 3.4 with my codding, so your help would be very appreciatted. The general problem for me is part of the code with: readBuffer = array.array('c...
by California
Wed Jun 27, 2018 6:11 am
Forum: Other
Topic: Install Windows 10 Arm For Raspberrypi 3B
Replies: 1
Views: 6821

Re: Install Windows 10 Arm For Raspberrypi 3B

Hello, any progress on this subject?

Regards, Vlado
by California
Wed Dec 20, 2017 8:36 pm
Forum: Raspberry Pi Desktop for PC and Mac
Topic: VNC on Raspberry Pi Desktop for PC and Mac
Replies: 9
Views: 2743

Re: VNC on Raspberry Pi Desktop for PC and Mac

You can acces Raspberry Pi Desktop for PC with remote desktop

Code: Select all

sudo apt-get install xrdp
Regards
Vlado
by California
Thu Dec 14, 2017 10:21 am
Forum: Raspberry Pi Desktop for PC and Mac
Topic: VNC on Raspberry Pi Desktop for PC and Mac
Replies: 9
Views: 2743

Re: VNC on Raspberry Pi Desktop for PC and Mac

Thanks for the respond. Instructions about installing Chromium gave no result. Even after reboot.

Vlado
by California
Thu Dec 14, 2017 8:15 am
Forum: Raspberry Pi Desktop for PC and Mac
Topic: VNC on Raspberry Pi Desktop for PC and Mac
Replies: 9
Views: 2743

VNC on Raspberry Pi Desktop for PC and Mac

So how to install VNC server on Raspberry Pi Desktop for PC and Mac, becouse command below doesn't work.

Code: Select all

sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer
Also Chrommium web browser doesn't work either, is there any trick to get it work?

Regards, Vlado
by California
Mon Oct 09, 2017 12:01 pm
Forum: Python
Topic: Python IDE
Replies: 10
Views: 3987

Re: Python IDE

jahboater wrote:
Thu Oct 05, 2017 7:40 pm
And for the long term solution, start using Python 3 :)
Ok, with some new project python 3 could be my tool in future.
Actual project is to large to move to python 3.

Regards
by California
Thu Oct 05, 2017 4:32 pm
Forum: Python
Topic: Python IDE
Replies: 10
Views: 3987

Re: Python IDE

Would you be so kind to explain how to manage to work with python 2.7?
There is written that only python 3.4 and later is supported ...
by California
Thu Oct 05, 2017 4:12 am
Forum: Python
Topic: Python IDE
Replies: 10
Views: 3987

Python IDE

What python (2.7) IDE do you recomend instead of Ninja, which doesn't work anymore?

Regards, Vlado
by California
Sun Sep 24, 2017 6:16 am
Forum: Python
Topic: How to run GUI application at boot
Replies: 11
Views: 18065

Re: How to run GUI application at boot

Hm, it doesn't work ... Have you tried using autostart as shown in the link in the 1st reply by topguy? nano /home/pi/.config/lxsession/LXDE-pi/autostart Your entry in autostart should look something like this added to the end of what's there already: @lxterminal -e python /home/pi/Project/Master_0...
by California
Sat Sep 23, 2017 8:16 pm
Forum: Python
Topic: How to run GUI application at boot
Replies: 11
Views: 18065

Re: How to run GUI application at boot

Hm, it doesn't work ...
by California
Sat Sep 23, 2017 5:20 pm
Forum: Python
Topic: How to run GUI application at boot
Replies: 11
Views: 18065

Re: How to run GUI application at boot

Thanks for help, obviously I am stil missing something. I can see CPU usage jumps over 20% but nothing happends. /etc/xdg/autostart/SCADA.desktop [Desktop Entry] Type=Application Name=SCADA Comment=SCADA app NoDisplay=false Exec=/usr/bin/lxterminal -e /home/pi/Project/startMaster.sh NotShowIn=GNOME;...
by California
Sat Sep 23, 2017 11:45 am
Forum: Python
Topic: How to run GUI application at boot
Replies: 11
Views: 18065

How to run GUI application at boot

Hello, I have a well working GUI application (PYQT4), which I would like to have started at boot of the RPi. Some instructions from links below were followed but with no luck at all. My app is in "/home/pi/Project/Master_06.py". https://www.dexterindustries.com/howto/auto-run-python-programs-on-the-...
by California
Tue Aug 08, 2017 9:06 am
Forum: Python
Topic: Simple script optimisation and starting at boot
Replies: 4
Views: 990

Re: Simple script optimisation and starting at boot

The question 1: is possible to optimise it somehow, to spend less CPU time? The question 2: how to make it run automatically at start? I'd try using pigpio's waves for the watchdog square wave. for temperature, i'm with dougie. Not really useful, but if you are doing that for testing.. well half a ...
by California
Mon Aug 07, 2017 10:31 am
Forum: Python
Topic: Simple script optimisation and starting at boot
Replies: 4
Views: 990

Re: Simple script optimisation and starting at boot

Thanks for your help.
Vlado
by California
Sun Aug 06, 2017 8:53 am
Forum: Python
Topic: Simple script optimisation and starting at boot
Replies: 4
Views: 990

Simple script optimisation and starting at boot

Hello, here is a very simple script for controlling CPU fan and generating square pulses for hardware watchdog circuit. It consumes ~2% of CPU time and it works as expected. The question 1: is possible to optimise it somehow, to spend less CPU time? The question 2: how to make it run automatically a...
by California
Sun Jul 23, 2017 9:06 pm
Forum: Python
Topic: Simple graph
Replies: 2
Views: 620

Re: Simple graph

Sorry, I was to fast. Should be: def simple_graph(): x = [58, 59, 0, 1, 2, 3] y = [1, 2, 3, 4, 5, 6] xdict = dict(enumerate(x)) win = pg.GraphicsWindow() stringaxis = pg.AxisItem(orientation='bottom') stringaxis.setTicks([xdict.items()]) plot = win.addPlot(axisItems={'bottom': stringaxis}) curve = p...
by California
Sun Jul 23, 2017 5:27 pm
Forum: Python
Topic: Simple graph
Replies: 2
Views: 620

Simple graph

Hello to all, below is simple script for graph, for exchanging standard x axis with string and it works ok. The problem is when I try to call this code as a method. Only graphic window is shown without any curve. Any help would be appreciated, from PyQt4 import QtCore import pyqtgraph as pg x = [58,...
by California
Wed Jun 28, 2017 7:46 am
Forum: Python
Topic: Conversion float to byte and backward
Replies: 14
Views: 5104

Re: Conversion float to byte and backward

@racpi - very nice piece of code which works 100% OK.
I'll try to include it into my project.

Thanks
by California
Wed Jun 28, 2017 6:27 am
Forum: Python
Topic: Conversion float to byte and backward
Replies: 14
Views: 5104

Re: Conversion float to byte and backward

Thanks to all of you for your help.
@paddyg - great job, your code works excellent.

Regards

Go to advanced search