Search found 35 matches

by mschulz
Wed Apr 22, 2015 8:45 am
Forum: General Discussion and Questions
Topic: object-oriented programming
Replies: 11
Views: 11118

Re: object-oriented programming

Thank you, for your help. Now the 2. Solution works. My problem was, that I think that I should create the instance of the scheduler in the construktor of the LED class, and then I have a problem, when I have more then one class. But this solution is verry nice and should work for my case. With kind...
by mschulz
Tue Apr 21, 2015 11:47 am
Forum: General Discussion and Questions
Topic: object-oriented programming
Replies: 11
Views: 11118

Re: object-oriented programming

Thank you for your Answer The first solution: I wil try it for this example, but my Projekt is bigger and I think there is this not a transparency way I think the Problem with the second solution is, when I have more than one class which will push funktions to the scheduler ? The Third way I dos not...
by mschulz
Tue Apr 21, 2015 7:15 am
Forum: General Discussion and Questions
Topic: object-oriented programming
Replies: 11
Views: 11118

Re: object-oriented programming

Yes, I have createt the instance in the main # here I import the Classes import imesscheduler import led print('init') switch=pyb.Switch() sched = imesscheduler.Scheduler() # here I create the instance LED1 = led.C_LED(1, 1000, 2000) LED2 = led.C_LED(2, 1000, 2000) sched.run() the LED Class class C_...
by mschulz
Mon Apr 20, 2015 8:42 am
Forum: General Discussion and Questions
Topic: object-oriented programming
Replies: 11
Views: 11118

object-oriented programming

Hello I want to write an OOP Program, but I have a Problem. How can I start a funktion of one Class in an other Class. For Example in the Scheduler (http://short4u.de/5534bb60d9855) When I copy the example, I bekome an error in the LED Class when I whant to start sched.schedule(self.time_on, self.of...
by mschulz
Fri Apr 17, 2015 11:39 am
Forum: Hardware Projects
Topic: Gripper Control
Replies: 2
Views: 3801

Gripper Control

Hello At first sorry for my bad Englich. I hope you can unterstand what I mean. Ich want to implement a force controll for Gripper with the Pyboard. Therefore I use - the ADC for measure the force - the servo (X1, X2) - the UART interface to communikate with a WLAn Modul (ESP8266) - an other UART in...