**** BEGIN LOGGING AT Sat Feb 15 02:59:57 2020 Feb 15 03:13:16 Insanity is a state of mind too. Feb 15 03:13:43 Yea and yep. Feb 15 03:13:57 It is not easy to try things when I do not understand what I am doing. Feb 15 03:14:16 One reads so they understand I thought? Feb 15 03:14:24 I can write bytes, words, and blocks or read them in this smbus2 i2c library. Feb 15 03:14:26 Right. Feb 15 03:14:31 You thought right. Feb 15 03:14:54 I read at times but where is this so called info? Feb 15 03:15:16 the i2c library is not marked w/ scorches of understanding nor is the library for the pca9685. Feb 15 03:17:30 I suggest you read register spaces IE 16 byte sections or 64 byte sections. Then compare the data to what it supposed to be. Feb 15 03:19:07 You can use python struc and pack unpack to get pieces parts of the data if it's in a bytearray. Feb 15 03:19:39 Okay. Feb 15 03:33:53 they give you the data too Feb 15 03:34:12 So you can see if what you wrote is returned from it as well. Feb 15 03:35:13 Should I perform a static write to find the buffer? Feb 15 03:35:25 Oh. Feb 15 03:35:36 You mean in the datasheet? Feb 15 03:36:01 __ADDRESS = 0x40? Feb 15 03:36:22 Or the subaddresses and modes? Feb 15 03:40:55 Anyway, here is a pastebin of some library I found that I have been goofing w/. Feb 15 03:41:37 https://pastebin.com/WmsAry31 is my current config. I am realizing from what you said, that I will need an entire byte of read data on the bottom couple of lines. Feb 15 04:00:12 Anyway, I am reading the struct.pack and struct.unpack sections now. Feb 15 04:12:25 why would you need struct? Feb 15 04:12:30 that seems implausible Feb 15 04:12:46 I have eight bites (a byte) from pack. Feb 15 04:12:49 anyway, this would be my start of the class: https://pastebin.com/c373K780 (completely untested of course) Feb 15 04:13:58 Okay. I will test it. Feb 15 04:14:13 note that reading multiple registers at once will require "autoincrement" to be enabled (bit 5 of the MODE1 register) Feb 15 04:14:53 the addr argument of the constructor is the address selected by the A0-A5 pins of the chip. if the cape pulls those to ground you can pass 0 Feb 15 04:15:19 (reading or writing multiple registers at once I mean) Feb 15 04:16:17 Okay. Feb 15 04:16:28 I don't know why I prefixed the global MODE1 constant with an underscore really Feb 15 04:16:39 Ha. Okay. Feb 15 04:16:40 you may as well just write MODE1 (in both places) Feb 15 04:16:46 Alright. Feb 15 04:17:08 So @zmatt, what does this source do exactly (supposedly)? Feb 15 04:17:17 Since it is untested. Feb 15 04:17:41 might figure it out by reading... Feb 15 04:17:46 Okay. Feb 15 04:18:53 I'm actually tempted to make the 'bus' parameter be the actual bus... if you have a script where you're using multiple i2c devices, it would be completely silly to open the bus device multiple times Feb 15 04:20:53 Right. I have been reading about i2c communication. SDA and SCL and how each can have multiple masters or slaves depending on which is which. Feb 15 04:23:15 ... Feb 15 04:24:18 So, I will keep in mind that if I need to access multiple addresses, I need "autoincrement" bit enabled, i.e. bit 5 of the Mode1 register. Feb 15 04:24:19 ... Feb 15 04:25:14 Well, the source worked but I need to make a script for it. I am going to test it. Feb 15 04:39:55 most of the i2c stuff in the datasheet can be ignored, those are low-level details that the i2c controller takes care of Feb 15 04:40:05 and all the shit about configuring addresses can likewise be ignored Feb 15 04:40:11 Oh. Feb 15 04:40:13 Okay. Feb 15 04:40:24 that's only relevant if you intend to control a whole bunch of these chips at the same time Feb 15 04:40:40 Aw. Okay. Feb 15 04:40:45 https://pastebin.com/RhKjeKC1 expanded example class. https://pastebin.com/fduyiLxg how you'd instantiate it Feb 15 04:41:31 I've added some sanity checking on the arguments in anticipation of you trying to pass nonsense to them :P Feb 15 04:42:45 Fine. Anyway... Feb 15 04:42:52 I will try not to goof it up. Feb 15 04:42:58 Oh and THANK you. Feb 15 04:43:07 Should I test it? Feb 15 04:43:29 oh hum, bit 12 of the registers doesn't quite work like I assumed it would Feb 15 04:43:49 annoying Feb 15 04:47:57 So, the addr is off? Feb 15 04:55:39 no I meant the pwm registers Feb 15 04:56:04 I've updated the code to make get/set_pwm conceivably work correctly Feb 15 04:56:28 it would require a fair bit of testing to determine whether it is, in fact, correct Feb 15 04:57:46 Okay. Feb 15 04:58:14 oh I already spot a small mistake Feb 15 04:58:36 fixed Feb 15 04:59:41 hmm, and factoring out pwm_reg makes no sense, it only applies to set and no get... Feb 15 05:00:07 Alright. I will check it out. Thank you, sir. I will test these sources to see if I can figure out anything. Feb 15 05:00:44 also fixed Feb 15 05:00:51 Ut oh! Feb 15 05:01:34 What was fixed? Feb 15 05:01:53 the paste for instantiation? Feb 15 05:02:35 the class Feb 15 05:02:44 Oh. Okay. Feb 15 05:04:30 also, remind me again wh you're messing with this cape, even though you also have the motor bridge cape (already working) and you don't actually need any cape to control servos... and of all three options (servo cape, motor bridge cape, just the beaglebone without cape) .. the servo cape probably has the worst accuracy Feb 15 05:04:54 Dang. I will remind you. Feb 15 05:05:37 Someone broke my electromechanical arm when i was young or it just broke. Then... Feb 15 05:05:46 I never got a new one! Feb 15 05:06:05 Now, I am going to make one. Well, that was the idea until this dang chip got complicated. Feb 15 05:06:30 and how many servos do you intend to control? Feb 15 05:06:45 I do not know just yet. Feb 15 05:07:07 so why are you not just starting with a solution that you already had working? Feb 15 05:07:47 Oh. Um...I really have no clue. I never really thought about it. I just thought this Cape would be like the other Capes but w/ less resistance. Feb 15 05:08:39 I will stick to what i know instead of capitalizing on your hard work. Please forgive me. Feb 15 05:08:56 That is not fare. Feb 15 05:09:06 Everything I do has some part of you in it. Feb 15 05:09:23 You pitch in when no one is around to support the BBB.io "way." Feb 15 05:10:10 I like my boards and want to learn more. Feb 15 05:10:14 this has very little to do with the BBB anyway, it's just an i2c pwm controller stuck onto a pcb and plugged into the BBB Feb 15 05:11:32 Oh. Okay. I know the chip is from NXP, and let me say this. They provide little to no support as I have found from their blogs. Feb 15 05:12:09 But...the BBB has many books dedicating specific chips and info. to the board. Feb 15 05:12:15 the datasheet is pretty clear, it's not their job to hold your hand on the software side Feb 15 05:13:21 You are right. I just figured working w/ people on matters would be better than getting support but you already know how to summarize datasheets. Feb 15 05:13:42 Me working w/ you is just free lessons to me. Feb 15 05:13:45 It is not the same. Feb 15 05:14:39 And. I do not expect you to downsize your capabilities to help all the time or to even stoop to my level of understanding in this "field." Feb 15 05:15:17 I really just appreciate you and your time more than the support (sometimes). Feb 15 05:16:35 And, I get it. You and others cannot allow me to flood the chat room when people really need support. Feb 15 05:17:10 For instance, who knows? Maybe someone will make something w/ their BBB and need time dedicated to the project. I do not know. Feb 15 05:17:25 I fiddle mostly for now. I am in a "blown away" learning adventure. Feb 15 05:18:54 ^ Those are the best kinds Feb 15 05:19:40 You chat? Feb 15 07:18:00 not much Feb 15 07:18:01 mostly lurk Feb 15 16:53:43 After noon Feb 15 18:17:24 Hello! Feb 15 19:05:46 @zmatt: Thank you for your guidance. I should have started w/ a smaller chip to initialize my understanding of the complications of datasheets and programming. Feb 15 19:07:32 This is not an enormous chip but it has "quirks" or guidelines to follow. These specificities on the datasheet outrank my understanding on what next steps to take. Feb 15 19:43:12 Trying to share Internet on Win-10 with BBB over USB. SSH 192.168.7.2 & Serial JTAG & Web 192.168.7.2 to it ok??? Feb 15 19:43:44 Can not ping to external address Feb 15 19:44:27 Route shows Feb 15 19:44:33 Destination Gateway Genmask Flags Metric Ref Use Ifacedefault 192.168.7.1 0.0.0.0 UG 0 0 0 usb0 Feb 15 19:45:28 default 192.168.7.1 0.0.0.0 UG 0 0 0 usb0 Feb 15 20:40:15 hey there, I am trying to compile the PRU examples for Beaglebone-AI and am getting a compilation failure I hope someone has an idea on: error: cannot find file "/usr/share/ti/starterware/pru/libdrivers.a" -- I updated all the software, but do I still need to install something else? Feb 15 20:43:18 rpcme: starterware? that's not for pru Feb 15 20:44:50 starterware is a (crappy) driver/utility library for running code directly on the AM335x Cortex-A8 with no OS Feb 15 20:44:59 https://pastebin.com/gdj2G3fU Feb 15 20:45:31 I must be doing something wrong .. I am more used to doing pru work in code composer, wanted to try this Feb 15 20:46:25 looks like some weird compiler flags are coming from somewhere Feb 15 20:47:20 okay I will try running make with -d and see if i can rummage through it Feb 15 20:47:25 thank you Feb 15 20:50:52 it compiles fine for me Feb 15 20:51:18 on a clean(-ish) 2019-08-03 image Feb 15 20:51:50 and I get zero hits from grep -rlIi starterware /var/lib/cloud9 Feb 15 20:52:18 so it seems you somehow managed to introduce this problem yourself, though it's a complete mystery to me how you might have accomplished that Feb 15 20:52:34 ok thanks Feb 15 20:55:31 I wonder if the quality of code generated by the pru compiler has improved since last time I looked at it Feb 15 20:56:31 so this has starterware in it https://github.com/beagleboard/cloud9-examples/blob/v2020.01/common/Makefile Feb 15 20:56:48 that is what the pru sample Makefile is including Feb 15 20:57:33 I'd say file a bug report Feb 15 20:57:44 starterware does not belong there Feb 15 20:57:57 using starterware is incompatible with running linux Feb 15 20:58:14 (also, starterware doesn't support the BBAI) Feb 15 20:58:27 (the am572x in general) Feb 15 20:59:51 got it Feb 15 21:00:05 yah i see this in the sw description "no-OS platform support " Feb 15 21:00:37 yes like I said, it's for running code on the AM335x with no OS Feb 15 21:00:55 n/a on linux, n/a on the AM5729 Feb 15 21:01:10 hm I think I am just going to go back to the IDK for now, I really wanted to check out the PRU demos oh well Feb 15 21:01:19 thank you for your help Feb 15 21:01:45 PRU is still pretty much the same anyhow Feb 15 21:02:13 just some minor enhancements to the subsystem, a slight clock frequency increase iirc, and there's two pruss instances Feb 15 21:06:53 do you happen to know the state of the TIDL demo? it didn't build either but i found the segmentation code in a dot subdirectory ... Feb 15 21:07:15 I haven't done anything with TIDL Feb 15 21:09:28 Ok cool. Thank you. I tried building it, the code doesn't compile. I'm 0/2 this afternoon so far. Feb 15 21:10:04 I will try to bring stuff over from processor sdk later. Feb 15 21:10:21 thanks again for your responses - have a good weekend Feb 15 21:10:38 have you tried just starting with a clean image, without installing updates? Feb 15 21:11:08 No. But I know that the sources in cloud 9 match my local for the latest 2020 release. Feb 15 21:11:43 but those didn't work while whatever was on the unmodified 2019-08-03 image compiled just fine Feb 15 21:12:05 the released image is likely to be tested Feb 15 21:12:10 I wanted to ensure I was as much on par as possible with 6.02 due to sagemaker neo Feb 15 21:12:25 ti processor sdk 6.02 Feb 15 21:14:55 ok you convinced me - i will just start from scratch Feb 15 21:15:10 trying to blend the debian image and ti psdk sounds like a way to make life more exciting Feb 15 21:15:29 ;) Feb 15 21:16:41 well, eventually I have to write a demo for bb-ai using ti processor sdk yocto image. 6.02 added bb-ai support. Feb 15 21:17:29 I've never really done anything with psdk, I'm just aware of its existence Feb 15 21:19:47 oh I like it - and my opinion is the documentation is very good. I rarely have troubles. I suggest poking around it a bit when you have some time. Feb 15 21:21:06 debian provides comfortable familiarity and I have enough stuff to do without experimenting with distros ;) I don't really feel any motivation to mess with what works Feb 15 21:22:02 I totally respect that! Feb 15 21:22:30 Need to go now, I will take what I've learned here and hit the reset button then give it another go. Feb 15 21:22:35 take care Feb 15 21:23:14 I'm sure yocto can build smaller images or such, but right now on production beaglebones we're using 726M of space on eMMC, 363M of which is our own stuff Feb 15 21:23:22 ok! Feb 16 01:29:37 Does anyone know what a RDS is? Feb 16 01:49:14 what kinda RDS? Feb 16 01:49:19 ¯\_(ツ)_/¯ Feb 16 01:59:55 Hey, not to be less smart than the rest of us BUT... Feb 16 02:00:21 On this PCA9685 chip, are pins hard coded in and available for use? Feb 16 02:00:57 I mean, can I use LED0 and the OE pins to set up source? Feb 16 02:01:47 For instance, if the pin states on the datasheet, "LED0," can I call it LED0 and expect to manipulate it? Feb 16 02:02:58 "I was going to take a night away to give people a break from me but..." Feb 16 02:03:09 Here I am! Feb 16 02:15:01 So, I use address input, then OE or Output Enable, and then my required Pin Config or LED0 (S1 on the Cape). Feb 16 02:18:13 This is a super fun project already. Software should be last. Now, I get you GenTooMan. Feb 16 02:18:24 Planning matey, planning. Feb 16 02:52:03 Okay, on the datasheet, I see 0 for decimal and 00 for hexidecimal. Why is there a "x" in b/t the dec. and hex. values? **** ENDING LOGGING AT Sun Feb 16 02:59:57 2020