Go to advanced search

by helpme
Sat Jan 11, 2014 2:24 pm
Forum: Python
Topic: How to get Mac address of ethernet port?
Replies: 1
Views: 9501

How to get Mac address of ethernet port?

I would like to use python to retrieve the mac address of the ethernet port of raspberry pi. Can this be done? Thank you.
by helpme
Tue Dec 31, 2013 4:42 pm
Forum: Python
Topic: How to compile main script into .pyo?
Replies: 0
Views: 418

How to compile main script into .pyo?

I would like to compile my script into .pyo. Currently, only the modules imported are compiled into .pyc. The main script is not compiled. How do I compile the main script and the imported modules into .pyo? I prefer the optimized version because it is harder to decompile back to source.

Thank you.
by helpme
Sat Dec 21, 2013 3:47 pm
Forum: Python
Topic: Copy data from one MySql database table to another database
Replies: 4
Views: 1787

Re: Copy data from one MySql database table to another datab

Hi, I have a MySql database with a table which is constantly growing with real-time data coming in. I would like to write a python script which copies this growing table to another table in another MySql database in real-time. Database replication was "invented" for these cases. When established, d...
by helpme
Sat Dec 21, 2013 2:14 pm
Forum: Python
Topic: Copy data from one MySql database table to another database
Replies: 4
Views: 1787

Copy data from one MySql database table to another database

I have a MySql database with a table which is constantly growing with real-time data coming in. I would like to write a python script which copies this growing table to another table in another MySql database in real-time. Which python libraries should I use? Are there any sample code or open-source...
by helpme
Mon Nov 18, 2013 10:01 am
Forum: Raspberry Pi OS
Topic: How to set correct time permanently?
Replies: 3
Views: 5277

How to set correct time permanently?

The time seen on my RPi is 26Sep13. How can the correct time be set and last permanently? I am worried that I need to set the time everytime after reboot. Thank you.
by helpme
Mon Nov 11, 2013 9:38 am
Forum: Python
Topic: Implementing multivibrator function
Replies: 1
Views: 577

Implementing multivibrator function

I am trying to implement a retriggerable multivibrator function with python on Raspberry Pi. This is how it works; - User presses a button - LED will light up for 5secs, then go off. - If user presses the button again before the 5secs expire, the on duration will be extended by another 5 secs. This ...
by helpme
Fri Oct 11, 2013 1:57 pm
Forum: Off topic discussion
Topic: Is it healthy to leave RF output unconnected?
Replies: 2
Views: 829

Is it healthy to leave RF output unconnected?

I have a RF device that has a transmitted power of up to 30dBm. This device has multiple antenna output connectors. When it is turned on, there is no antenna connected to some of the RF outputs. Will this lead to higher than normal radiation compared to having an antenna connected to it? At the mome...
by helpme
Thu Oct 03, 2013 6:49 am
Forum: Python
Topic: Multiple scripts versus single multi-threaded script
Replies: 1
Views: 539

Multiple scripts versus single multi-threaded script

What is the difference of running multiple python scripts and a single multi-threaded script? May I know what are the pros and cons of each approach? Right now, my preference is to run multiple separate python scripts because it is simpler.
by helpme
Sun Sep 22, 2013 1:46 pm
Forum: Off topic discussion
Topic: Why wrong voltage will spoil a device but not wrong current
Replies: 4
Views: 1312

Re: Why wrong voltage will spoil a device but not wrong curr

Thank you for the explanations. Crystal clear now:)
by helpme
Sun Sep 22, 2013 1:13 pm
Forum: Off topic discussion
Topic: Why wrong voltage will spoil a device but not wrong current
Replies: 4
Views: 1312

Why wrong voltage will spoil a device but not wrong current

This sounds like a basic question. I know when I connect wrong voltage into a MCU pin, it may spoil the MCU. But when I pump in very high power supply current, the device does not spoil. I just know it as a practitioner but cannot explain it. Can someone explain the theory? Thank you very much.
by helpme
Sun Sep 22, 2013 12:58 pm
Forum: Off topic discussion
Topic: Why are lithium batteries prone to explosion?
Replies: 6
Views: 2863

Why are lithium batteries prone to explosion?

Lithium batteries have been in the news lately for the wrong reasons. Boeing, Samsung, Apple have all reported incidents of battery explosion. Why are lithium batteries prone to explosion?

Will it be safer to use NiMH batteries? Are they less prone to explosion compared to lithium batteries?
by helpme
Wed Sep 18, 2013 6:31 am
Forum: Automation, sensing and robotics
Topic: Will IR sensors be affected by sunlight?
Replies: 3
Views: 1090

Will IR sensors be affected by sunlight?

Will IR(infrared-red) sensors be affected by sunlight? My sensor works in the Far infrared-red range wavelength (5um-15um). Is it correct to say that the sensor works in different wavelength from sunlight, so it should not be affected?

Thank you.
by helpme
Sat Sep 14, 2013 7:29 am
Forum: Off topic discussion
Topic: Why aren't engineers paid by the hour like consultants?
Replies: 17
Views: 3767

Re: Why aren't engineers paid by the hour like consultants?

Sorry in advance for the rant, it's a bit all over the place, but it's an interesting that seems to have got me going. To use your examples consultants, lawyers, accountants and doctors tend to specialise in specific fields. Lawyers may only work on family law, criminal law, commercial law or whate...
by helpme
Sat Sep 14, 2013 3:58 am
Forum: Off topic discussion
Topic: Why aren't engineers paid by the hour like consultants?
Replies: 17
Views: 3767

Why aren't engineers paid by the hour like consultants?

Sometimes, I wonder why engineers cannot be paid by the hour for their services like consultants, lawyers, accountants, even doctors. One reason I can think of is that the engineering outcome (specs) can be easily measured. So, it is hard to screw customers like some management consultants did to th...
by helpme
Fri Sep 13, 2013 12:47 pm
Forum: Python
Topic: Can python source code be hidden by distributing bytecode?
Replies: 10
Views: 8895

Re: Can python source code be hidden by distributing bytecod

Does this mean that all software such as Dropbox which are written in python can be reverse-engineered? How does big companies like Dropbox protect their software?
by helpme
Fri Sep 13, 2013 12:27 pm
Forum: Python
Topic: Using python to call C/C++ functions?
Replies: 2
Views: 3280

Using python to call C/C++ functions?

Is it possible to use python to call C/C++ functions? Do such C functions need to be specially created to be callable by python? To access hardware peripherals from python, is the right approach to write C functions to access the hardware and then make it callable by python?
by helpme
Fri Sep 13, 2013 12:19 pm
Forum: Python
Topic: Can python source code be hidden by distributing bytecode?
Replies: 10
Views: 8895

Can python source code be hidden by distributing bytecode?

One disadvantage about scripting languages is that their source code cannot be hidden. For python, can the source code be protected by distributing byte code only?

Thanks.
by helpme
Sat Aug 24, 2013 10:20 am
Forum: Other programming languages
Topic: Is Windows mobile platform easiest for developers?
Replies: 7
Views: 2759

Re: Is Windows mobile platform easiest for developers?

helpme, I am developing for myself. This is why I want to keep development time as short as possible. Not trying to sell for profit. I can appreciate that. So you have to ask yourself some questions: 1) What is it I actually want to make? 2) Which platforms out there support the features I need to ...
by helpme
Sat Aug 24, 2013 10:01 am
Forum: Other programming languages
Topic: Is Windows mobile platform easiest for developers?
Replies: 7
Views: 2759

Re: Is Windows mobile platform easiest for developers?

Development for Windows Mobile with Visual Studio may be easy. Who knows, nobody uses Windows Mobile? If you want a platform to develop for, mobile or otherwise, isn't it better to select one that is actually used by a lot of people? On top of that I would add that I don't want to develop for any c...
by helpme
Sat Aug 24, 2013 4:59 am
Forum: Other programming languages
Topic: Is Windows mobile platform easiest for developers?
Replies: 7
Views: 2759

Is Windows mobile platform easiest for developers?

Over lunch, a mobile developer told me that the simplest development mobile platform is actually Windows, not Android or iOS. This is because of Visual Studio. What are your opinions? I am not a mobile app developer but trying to pick a platform to develop on.
by helpme
Sat Aug 24, 2013 3:32 am
Forum: Raspberry Pi OS
Topic: Folder to put python scripts to start during boot-up
Replies: 2
Views: 677

Folder to put python scripts to start during boot-up

I have some python scripts which I would like to start automatically after boot-up. Is there a folder in Raspbian which I can put the python scripts which I want to start after boot-up?

Anyone can suggest any way to launch a python script automatically after boot-up?

Thank you.
by helpme
Fri Aug 23, 2013 11:14 pm
Forum: Python
Topic: How to send broadcast IP address to network?
Replies: 5
Views: 3871

Re: How to send broadcast IP address to network?

I don't know if your router/other computers will allow that. To them, you could as well be broadcasting a virus. They probably have protection against it. I just found a solution. The following 2 lines need to be run first; udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) udp_socket.se...
by helpme
Fri Aug 23, 2013 12:35 pm
Forum: Python
Topic: How to send broadcast IP address to network?
Replies: 5
Views: 3871

How to send broadcast IP address to network?

I am new to python. I want to send a broadcast packet to all the computers connected to my home router.

The following 2 lines of code do not work;
host="192.168.0.255"
s.connect((host, port))

Can someone advise?

Thank you.
by helpme
Sun Aug 18, 2013 5:09 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Maximum current drawn from USB (Model B)
Replies: 8
Views: 5442

Re: Maximum current drawn from USB (Model B)

tonyhughes wrote:Where has that been stated?
I read it somewhere in an interview in one of the MagPi magazine issues. Maybe I remembered incorrectly. But the fact remains that the polyfuse was removed from USB.
by helpme
Sun Aug 18, 2013 5:07 am
Forum: Off topic discussion
Topic: Is it safe to buy stuff with no FCC/CE certification?
Replies: 7
Views: 1761

Re: Is it safe to buy stuff with no FCC/CE certification?

Safe yes, most of the time. It is things that require a UL cert that don't have one that you should be concerened about. Do a search on all the exploding iPhones in China lately. There have been vendors there selling chargers to consumers that run the mains power right to phone battery. In China th...

Go to advanced search