[beagleboard] Re: python script error

2021-03-19 Thread Dennis Lee Bieber
On Thu, 18 Mar 2021 23:42:04 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Ekkam Singh
 wrote:

>hi 
>i am writing a code in python but it is coming error when i write the 
>program :-
>for line in username:
>content = username.split(' , ')

content = line.split(",")

NOTE: your split is explicitly expecting  which is
an unnatural usage of commas. Better, I would think, is to use
content[*].strip() to get rid of the spaces after splitting on the comma.

>if content[0] == userName:
>content[1] = score
>line = content[0] + ', ' + content[1] + '\n'

Confusing usage. Your main input is a list or iterable called
"username", yet you are expecting the first term of each LINE of that
iterable to contain something you compare to whatever userName contains.

Also, note that you are appending a newline when recreating line, but
does the unmodified line end with a newline? (I'm assuming you later write
either the modified or unmodified line to some file).

There is no need to bind "score" to content[1] if the only usage is
then to join strings. Also, "score" needs to be a string for that joining
to work -- if it is numeric you need to convert it. Consider:

for line in username:   #still don't like that object name...
#user_scores may be more 
applicable.
uName = line.split(",")[0].strip()  #don't care about rest
if uName == userName:
line = "%s, %s\n" % (uName, score)
#using %s means whatever "score" type, it will
#be converted to a string representation

 


-- 
Dennis L Bieber

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/tg7a5gp6hvmoltbr1klop0kugovngg6j9k%404ax.com.


[beagleboard] RE: http://beagleboard.org/librobotcontrol/

2021-03-19 Thread set_
Hello,

Is LibRobotControl still being pursued and maintained by anyone?

I am asking b/c I have a BBBlue and I just wired up some motors and wheels. 
The tests all pass, i.e. except for some PRU lib. 

Anyway, I keep trying to use the lib. I am receiving errors.

The errors are dedicated to this idea:

*the function is deprecated...*

Are the docs still being kept?

Seth

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/3dfc1b12-8697-4f84-b3b6-4b391eeda9a9n%40googlegroups.com.


Re: [beagleboard] Re: Servomotor Herkulex Beaglebone

2021-03-19 Thread jonnymo
There are folks connecting directly to Herkulex Servos with Arduino boards,
so I imagine it is possible with a BeagleBone but I would not do it
directly to a GPIO pin.

https://wiki.dfrobot.com/Herkulex_DRS-0101_SKU_SER0032

Jon

On Fri, Mar 19, 2021 at 10:00 AM amf  wrote:

> page 17 of the manual that Dennis attached implies that a serial interface
> module is needed. see the second caution on that page.
>
>
> On Friday, March 19, 2021 at 7:24:31 AM UTC-5 Dennis Bieber wrote:
>
>> On Thu, 18 Mar 2021 08:27:40 -0700 (PDT), in
>> gmane.comp.hardware.beagleboard.user Adnane Dinar
>>  wrote:
>>
>> >I need someone who know how control a herkulex servo with my beagle bone
>> in
>> >python or c
>>
>> Typically, servos are controlled by using a PWM signal. cf:
>> https://stackoverflow.com/questions/50203064/pwm-on-beaglebone-black-v4-14
>>
>> However, the documentation for this servo
>>
>> https://www.robotshop.com/media/files/pdf2/_eng_herkulex_manual_20140218.pdf
>> indicates that this servo uses 115200bps 8n1 TTL level SERIAL
>> communication
>> -- eg: a UART.
>>
>> Unfortunately, the diagram on page 51 indicates that "TTL" means
>> original 5V TTL. 5V will kill a Beagle -- the pins are limited to 3.3V.
>> The
>> diode/resistor set shown at the top left /might/ imply that the TTL is
>> using a pull-up circuit -- in which case feeding 3.3V instead of 5V may
>> be
>> sufficient.
>>
>>
>> --
>> Dennis L Bieber
>>
>> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/eba5bae0-eb23-4798-a8ed-c19e2efafaffn%40googlegroups.com
> 
> .
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAG99bkqWa%2BXJjC7RBYsD4k4kfhx0WcwmXGiX29xqQ5Lxif%2BkVw%40mail.gmail.com.


[beagleboard] Re: Servomotor Herkulex Beaglebone

2021-03-19 Thread amf
page 17 of the manual that Dennis attached implies that a serial interface 
module is needed. see the second caution on that page.


On Friday, March 19, 2021 at 7:24:31 AM UTC-5 Dennis Bieber wrote:

> On Thu, 18 Mar 2021 08:27:40 -0700 (PDT), in
> gmane.comp.hardware.beagleboard.user Adnane Dinar
>  wrote:
>
> >I need someone who know how control a herkulex servo with my beagle bone 
> in 
> >python or c 
>
> Typically, servos are controlled by using a PWM signal. cf:
> https://stackoverflow.com/questions/50203064/pwm-on-beaglebone-black-v4-14
>
> However, the documentation for this servo
>
> https://www.robotshop.com/media/files/pdf2/_eng_herkulex_manual_20140218.pdf
> indicates that this servo uses 115200bps 8n1 TTL level SERIAL communication
> -- eg: a UART.
>
> Unfortunately, the diagram on page 51 indicates that "TTL" means
> original 5V TTL. 5V will kill a Beagle -- the pins are limited to 3.3V. The
> diode/resistor set shown at the top left /might/ imply that the TTL is
> using a pull-up circuit -- in which case feeding 3.3V instead of 5V may be
> sufficient.
>
>
> -- 
> Dennis L Bieber
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/eba5bae0-eb23-4798-a8ed-c19e2efafaffn%40googlegroups.com.


Re: [beagleboard] python script error

2021-03-19 Thread jonnymo
What version of Python are you using?
How is 'username' defined and how is the value being assigned to it?

Cheers,

Jon

On Fri, Mar 19, 2021 at 5:49 AM Ekkam Singh  wrote:

> hi
> i am writing a code in python but it is coming error when i write the
> program :-
> for line in username:
> content = username.split(' , ')
> if content[0] == userName:
> content[1] = score
> line = content[0] + ', ' + content[1] +
> '\n'
> it is coming error :
> AttributeError: '_io.TextIOWrapper' object has no attribute 'split'
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/35de0395-e66c-41e4-b574-0a52dd6d7bc8n%40googlegroups.com
> 
> .
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAG99bkrPtt2o6o0Uu5Sq0xVCoNjeF0sGgEXMxdbvot4qSaMMTQ%40mail.gmail.com.


RE: [beagleboard] Overlay -- set GPIO initial value

2021-03-19 Thread rpaulbeam
That’s interesting!  I can't say that I perfectly understand all this.  It 
seems that mastery (or at least competence) with the device tree takes a lot of 
time.  I'm going to play with that example and see how it works.  Thanks!

-Original Message-
From: beagleboard@googlegroups.com  On Behalf Of 
Robert Nelson
Sent: Friday, March 19, 2021 11:26 AM
To: Beagle Board 
Subject: Re: [beagleboard] Overlay -- set GPIO initial value

On Thu, Mar 18, 2021 at 10:06 AM Paul Beam  wrote:
>
> I'm creating my first device tree overlay for the PocketBeagle intending to 
> setup the I/O pins the way I need them without having to run an additional 
> script to set things up.  I'm using this as a 
> template:https://github.com/jadonk/validation-scripts/blob/master/test-capemgr/pinctrl-test-0.dts
>
> Is it possible in the device tree overlay to not only set the mux setting, 
> but also set the pin initial value?  For example, if I set a GPIO as an 
> output, can I also set that output hi?

model it as a gpio-led, which has a default state..

https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-RELAY-4PORT-00A0.dts#L89-L92

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to a topic in the Google 
Groups "BeagleBoard" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/beagleboard/E2CQGMesMdk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYgA-%2BicfqONfqm3a5q%3D_MAoaSKX7mZth6jKfeKybhF5Pg%40mail.gmail.com.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/05cb01d71cd6%2437fcc350%24a7f649f0%24%40gmail.com.


Re: [beagleboard] Servomotor Herkulex Beaglebone

2021-03-19 Thread jonnymo
Which Herkulex server are you considering to use with the Beaglebone?

Personally, I would not connect anything directly to a GPIO pin on the BB
and prefer to use a driver circuit to drive the signals to something like a
servo.

There is an Interface Manager for the Herkulex servos so that might be a
place to start:
https://www.robotshop.com/en/interface-manager-kit-herkulex-servo.html?gclid=EAIaIQobChMIw6n7n9W87wIVydXACh39EgmfEAQYASABEgJLPvD_BwE

With a quick search I did find this GitHub repo:
https://github.com/robot-mitya/herkulex-servo


Cheers,

Jon

On Thu, Mar 18, 2021 at 8:51 AM Adnane Dinar  wrote:

> I need someone who know how control a herkulex servo with my beagle bone
> in python or c
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/e559aa4d-d540-4d03-a2df-8eb2480741aan%40googlegroups.com
> 
> .
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAG99bkqw7bGL9xjtJQzjRa6AJ20OV18yU_NjKxZ9yq93n7G-Bg%40mail.gmail.com.


[beagleboard] Re: Overlay -- set GPIO initial value

2021-03-19 Thread TJF
Hi!

rpau...@gmail.com schrieb am Donnerstag, 18. März 2021 um 16:06:43 UTC+1:

> Is it possible in the device tree overlay to not only set the mux setting, 
> but also set the pin initial value?  For example, if I set a GPIO as an 
> output, can I also set that output hi?


No, that's not possible in device tree overlays. Only libpruio 
 provides that feature. 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/7b5fc076-62da-4ce7-b3aa-b125c125a694n%40googlegroups.com.


[beagleboard] python script error

2021-03-19 Thread Ekkam Singh
hi 
i am writing a code in python but it is coming error when i write the 
program :-
for line in username:
content = username.split(' , ')
if content[0] == userName:
content[1] = score
line = content[0] + ', ' + content[1] + '\n'
it is coming error :
AttributeError: '_io.TextIOWrapper' object has no attribute 'split'

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/35de0395-e66c-41e4-b574-0a52dd6d7bc8n%40googlegroups.com.


[beagleboard] Re: Servomotor Herkulex Beaglebone

2021-03-19 Thread Dennis Lee Bieber
On Thu, 18 Mar 2021 08:27:40 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Adnane Dinar
 wrote:

>I need someone who know how control a herkulex servo with my beagle bone in 
>python or c 

Typically, servos are controlled by using a PWM signal. cf:
https://stackoverflow.com/questions/50203064/pwm-on-beaglebone-black-v4-14

However, the documentation for this servo
https://www.robotshop.com/media/files/pdf2/_eng_herkulex_manual_20140218.pdf
indicates that this servo uses 115200bps 8n1 TTL level SERIAL communication
-- eg: a UART.

Unfortunately, the diagram on page 51 indicates that "TTL" means
original 5V TTL. 5V will kill a Beagle -- the pins are limited to 3.3V. The
diode/resistor set shown at the top left /might/ imply that the TTL is
using a pull-up circuit -- in which case feeding 3.3V instead of 5V may be
sufficient.


-- 
Dennis L Bieber

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/43595g109c2mpctr8tenjsptjld41ajap1%404ax.com.