**** BEGIN LOGGING AT Tue Apr 14 02:59:57 2020 Apr 14 03:54:27 hmm I can't remember of BBB io is 1.8V or 3.3V .. ugh Apr 14 03:58:29 3.3V Apr 14 03:58:42 except the ADC inputs Apr 14 03:59:33 The side of the died tide? Apr 14 04:00:42 (the ADC inputs are 1.8V since the magic hack used to get digital I/O to work at the dangerously high voltage (for these tiny transistors anyway) of 3.3V can't really be applied to analog pins) Apr 14 04:02:09 ah good I was worried I has screwed up the cape schematic and had to redo it. Apr 14 04:03:28 well it's still possible you screwd it up in some unrelated way Apr 14 04:06:51 but yeah, both the am335x and the am57xx support 1.8V or 3.3V digital I/O, selectable per high voltage supply domain (the am335x has 6 of those, the am572x has 11) Apr 14 04:07:17 and both beaglebone (incl ai) and bbx15 use 3.3V for all domains Apr 14 04:08:23 the old beagleboard (classic and xm) will have had 1.8V I/O... the omap3 it uses does actually have dual-voltage digital I/O as well, but it's 1.8V or 1.2V :D Apr 14 04:09:58 well for now that works, I'm making a cape not a custom board. that's why you make capes so you don't have to layout a PGA (at least that's what I say). I have a few beagleboards, I should get rid of them. Apr 14 04:10:57 I need to go to sleep... I tend to work 10 hours straight without even thinking. sigh Apr 14 04:11:27 good morning and enjoy your day! Apr 14 04:13:12 I need to sleep too, but I'm still too awake Apr 14 04:22:26 Hey! Apr 14 04:22:52 Is keras available for the BBB if someone finds a way to get tensorflow on the board? Apr 14 04:23:57 Somehow, I have tensorflow 0.1 on the board, i.e. BBB. But, the regular python command does not interpret import tensorflow as tp yet. Apr 14 04:26:19 Now, I am asking b/c keras is on the board but the other backends are not available, e.g. outside of tensorflow. They have some older ones but they are becoming extinct. Apr 14 04:26:36 Oh! Apr 14 04:26:59 Is the tidl stuff still being produced for the BBAI and similar boards? Apr 14 04:28:07 I see it is still being made available b/c of the new images. Apr 14 04:28:09 This is nice. Apr 14 12:01:28 m Apr 14 13:49:19 m2u Apr 14 15:08:31 has anyone run into python gpio permissions errors while coding on the beaglebone? Apr 14 15:09:11 I am trying to use input gpio to detect events (pull down input) and I am getting a permission issue I cant figure out. Apr 14 15:09:20 ValueError: Set gpio mode failed, missing file or invalid permissions. Apr 14 15:10:06 I am using the most up-to-date adafruit_bbio and the most recent debian 10 buster from beaglebones latest images page Apr 14 16:35:35 Brady45: are you running from sd card or eMMC ? Apr 14 16:35:52 Brady45: and please don't send private messages Apr 14 16:36:58 since if there's an ancient system (or more specifically an ancient bootloader) installed on eMMC and you boot a new system from SD card, you can have all sorts of weird problems Apr 14 16:37:33 (which are fixed by either flashing to eMMC, or erasing eMMC if you want to continue running from sd card) Apr 14 17:30:35 really basic question Apr 14 17:31:05 what is the design pattern one would use for a application where one has a class responsible for communicating with a device Apr 14 17:31:26 so my project is integrating two controllers a load cell and motor controller Apr 14 17:31:34 i am trying to put this all under qt Apr 14 17:31:50 so I have my form with a button that triggers a click event. Apr 14 17:32:07 i cannot have my controller class instanced by the click Apr 14 17:46:27 I have no idea what you're asking Apr 14 17:48:45 any objects that represent physical devices will usually need to be instantiated globally Apr 14 17:52:14 ok Apr 14 17:52:31 so then the main class in a c++ application Apr 14 17:52:45 i need to buy a book Apr 14 17:52:57 this is probably very basic problems in my understanding Apr 14 17:54:26 unqiue global objects (singletons) can simply be declared as global variables, or as a member of another singleton, or you can create global function (or method on another singleton) that returns the unique instance, creating it if necessary Apr 14 17:55:26 the latter may be necessary if the singleton is needed for the initialization of other singletons, since otherwise you may run into problems with ordering of global initialization Apr 14 17:55:59 (if you have two global objects defined in separate files, it's undefined in which order they will be initialized at program startup) Apr 14 17:56:17 if your application has such as thing as a "main class" then that would be an example of a singleton Apr 14 17:57:30 (C/C++ applications in general just have a main function, but some C++ frameworks add the concept of a main class) Apr 14 17:58:56 main function is what I probably meant to say Apr 14 17:59:26 yeah I guess that's another place where you could instantiate singletons, if you want precise control over when they are instantiated Apr 14 18:10:40 MattB0ne: https://pastebin.com/TQY0geDw Apr 14 18:11:34 oh, for the third and fourth example you can of course give "instance" an initializer if you want, I just didn't write the "= ..." Apr 14 18:13:14 I've omitted the option of making the singleton a member of another singleton since that option is hopefully self-explanatory (in that case it's always initialized during the initialization of the parent singleton) Apr 14 18:16:18 "static" is such an awful keyword in C++, it means completely different things in different contexts (file scope vs class scope vs function scope) Apr 14 18:32:43 Sorry zmatt, I am running from SD card Apr 14 18:33:52 I ran a command that was supposed to nuke the eMMC though and it didn't work. I can't definitively say however, that the command did what it was supposed to do Apr 14 18:34:08 sudo blkdiscard /dev/mmcblk1 Apr 14 18:34:10 it was just a suggested fix in a github issues page somewhere Apr 14 18:34:15 that was it I think Apr 14 18:34:34 in what sense did it not work? Apr 14 18:34:48 what error did you get? Apr 14 18:35:01 oh you mean it didn't fix your problem Apr 14 18:35:09 exactly Apr 14 18:35:22 (I misinterpreted it as the command itself failing) Apr 14 18:35:41 nope. it does fail now because that file is no longer there Apr 14 18:35:57 but initially it didn't fail. Just didn't solve my issue either Apr 14 18:36:01 wait what? Apr 14 18:36:18 have you meddled with your settings in /boot/uEnv.txt ? Apr 14 18:36:22 right now if I run that command you stated above I get this: Apr 14 18:36:29 blkdiscard: cannot open /dev/mmcblk1: No such file or directory Apr 14 18:36:47 that means you disabled eMMC in /boot/uEnv.txt (which was previously ignored by the old bootloader on eMMC) Apr 14 18:37:14 what other settings did you change there? Apr 14 18:38:00 okay I can change that back. As for other /boot/uEnv.txt changes, I added two custom overlays in for some spi devices which work well and for a few i2c devices. Apr 14 18:38:07 the i2c is actually not custom Apr 14 18:38:16 its the BB-I2C2-00A0 Apr 14 18:38:46 oh you're not using cape-universal Apr 14 18:38:52 did you disable it? Apr 14 18:39:26 nope. I am prototyping straight into the beagle right now so I have no cape. Just the beagle black and a protoboard and wires Apr 14 18:39:30 breadboard** Apr 14 18:39:35 cape-universal isn't a cape Apr 14 18:39:53 a better name would be the universal overlay, but for historical reasons it's called cape-universal Apr 14 18:40:05 it's enabled by default Apr 14 18:40:29 (enable_uboot_cape_universal=1 Apr 14 18:40:30 ) Apr 14 18:40:31 oh okay. in the uEnv.txt I have cape universal commented out because it stopped my spi from working Apr 14 18:40:39 and i have the emmc disabled Apr 14 18:43:20 the adafruit library probably depends on cape-universal. if not using cape-universal, you can either declare gpios in DT youself (see gpio-demo in my overlays repo), which has the benefit of making it possible for software to use them by name (not having to care about gpio numbers), or you can just manually export the gpios yourself by writing gpio numbers to /sys/class/gpio/export (which will make ... Apr 14 18:43:26 ...them appear) Apr 14 18:45:05 the adafruit library probably still won't work, but you don't really need a library for gpios anyway... all you do generally is read/write its 'value' attribute in sysfs (which behaves basically just like reading/writing a file containing just a "0" or "1") Apr 14 18:45:43 okay I need the gpio to be set on boot since i need the beaglebone to run this program on boot much like an arduino sketch so I will have to get a DT made for it Apr 14 18:46:17 yeah just declare it in an overlay Apr 14 18:46:39 although I don't really see how your reasoning makes sense Apr 14 18:46:48 okay I will try to figure out how to use yours and make one for my application Apr 14 18:47:05 what makes you skeptical? Apr 14 18:47:13 i am fairly new to this stuff so I am learning Apr 14 18:47:24 why would it matter that your program is run at boot? Apr 14 18:47:25 i could not be thinking of things right Apr 14 18:49:10 I'm tasked with designing an embedded system that is going to operate on a moving piece of equipment. One of the deliverables is more or less they want to set this machine up quickly at its designated demonstration locations and basically just have to plug it in. I need to try to automate the process as much as possible Apr 14 18:50:04 this won't necessarily be set up by knowledged individuals for this stuff Apr 14 18:50:07 oh, when I said "manually" I meant the kernel won't do it for you (like it will when you declare gpios in DT), I didn't mean you have to do it yourself in a shell, obviously software can export gpios the same way Apr 14 18:51:07 so doing it that way is uglier but simpler Apr 14 18:53:57 oh I just reread your original question.. getting input events using pure python is slightly trickier but still shouldn't be very hard, lemme see Apr 14 18:56:14 (but the short summary is: you set the 'edge' attribute of the gpio to 'rising', 'falling', or 'both', and then the kernel will signal these events with a POLLPRI on any open file descriptor for the 'value' attribute) Apr 14 18:59:48 right. I just cant even run any programs because I keep getting the permissions error. Hopefully a DT will fix that problem Apr 14 18:59:51 thank you for your help Apr 14 18:59:59 I doubt that Apr 14 19:00:12 the debian account has all permissions it needs Apr 14 19:00:21 (in this context) Apr 14 19:00:34 the adafruit library is probably mostly giving errors because the adafruit library sucks Apr 14 19:00:40 lol Apr 14 19:00:55 most likely it _depends_ on cape-universal and is incapable of using gpios otherwise Apr 14 19:01:06 I tried the PyBBIO library but it wasn't too successful either Apr 14 19:01:54 do you suggest another way of going about utilizing gpio? Apr 14 19:02:46 I can't get rid of the spi devices that I have and that DT works really well as long as cape-universal is commented out Apr 14 19:03:56 if the gpio is configured using an overlay then like I said you often don't need a library (if you just need to read/write them). if you need to also configure them (e.g. change direction) then that's still pretty simple (untested tiny wrapper class: https://pastebin.com/EU77NQtN ) Apr 14 19:04:49 yeah no I just need gpio for limit switches so I just need to read them Apr 14 19:04:49 as for input events, I just remarked about that (and I'm still checking what the options are for getting POLLPRI / exceptional fd status reported in python) Apr 14 19:05:20 just read them? earlier you said you wants events for them Apr 14 19:05:22 *wanted Apr 14 19:06:25 I think I can get away with running a loop and reading them quick;y. Apr 14 19:06:28 quickly Apr 14 19:06:44 and cape-universal is often kind of an all-or-nothing deal: either you should use cape-universal for gpio, spi, and i2c (and don't use any overlay at all), or use overlays for everything Apr 14 19:06:51 please don't do that, that's disgusting Apr 14 19:07:31 i'll have to read into the POLLPRI Apr 14 19:07:39 i wasn't aware of that Apr 14 19:07:50 are you currently using any event handling system yet? Apr 14 19:07:57 nope Apr 14 19:10:39 *sigh* I guess pretending it's an arduino and poll everything is simpler than actually doing things right Apr 14 19:11:23 well I have time. I would rather do things right. This is a learning project so spending the time to learn makes more sense to do it right Apr 14 19:13:39 I just didn't realize the beaglebone has dedicated event handling solutions (my first time using the beaglebone) Apr 14 19:13:50 it doesn't Apr 14 19:13:55 like I said, I am just indulging into the land past arduinos Apr 14 19:14:13 I'm talking about generic libraries for the programming language of your choice (python) Apr 14 19:14:39 oh okay. I'll see what there is available to use for python Apr 14 19:16:56 dealing with pin setup and locating the correct gpio are the only beaglebone-specific parts. using the gpio (read/writing, reconfiguring it, getting events) is just the sysfs gpio interface of linux (generic across all linux systems that have gpios), handling fd events (including POLLPRI) is mostly generic across all unix-ish systems (including linux and mac) and to large extent even windows Apr 14 19:17:07 well, I guess maybe not windows Apr 14 19:17:31 (though plenty of event handling libraries/frameworks exist that abstract away the differences betwen platforms) Apr 14 19:21:58 the annoying bit is that python's asyncio library (and its underlying "selectors" library) doesn't seem to support reporting fd events other than read (POLLIN) and write (POLLOUT) Apr 14 19:23:23 yeah and the I have been asked to do this in python so I can't switch to c++ or something that might be nicer Apr 14 19:23:25 (although the various lower-level mechanisms in the "select" module do) Apr 14 19:24:05 I guess if you want to use asyncio you could create a select.epoll object and then hook that into the asyncio event loop Apr 14 19:25:08 I could see if I can make an example of that, but first I need to do some quick shopping Apr 14 19:25:42 Okay thank you! Apr 14 20:06:24 food is always a good idea Apr 14 20:13:50 zmatt: thanks! Apr 14 20:24:34 GenTooMan: I'm pretty sure that statement is false ;) Apr 14 21:06:00 zmatt it's a matter of perspective I suppose if one forgets to eat often it's definitely true Apr 14 21:06:30 oh I agree that regular food is a good idea, but "always" is a bit of a stretch ;) Apr 14 21:07:03 it's been decades since I have eaten too much.. I guess I've forgotten what that's like? Apr 14 21:07:26 right I suppose everything in moderation as they say Apr 14 21:08:21 Are you two building food robots w/ the BBBs? Apr 14 21:17:35 I think the better thing is to use robots to improve on demand scaled production. IE production less based on batching and scaled to need / demand. Apr 14 21:19:25 even a robot for automated onion peeling (IE order fresh chopped onions and pick up at the store) Apr 14 21:19:52 that said how is your set_ bot working out? Apr 14 21:25:52 Nice! Apr 14 21:26:04 It works. Well, they both work so far. Apr 14 21:26:21 The BBGW has the floor while the BBBlue is in the air! Apr 14 21:27:24 I just made a post on google groups about KERAS, tensorflow, and tidl. GenTooMan: Call the hounds. I need people to supply their ideas! Apr 14 21:27:49 Well, that is. If they are bored relentlessly or tired of working too often. Apr 14 21:33:24 ideas are a dime a dozen real works are a ten spot each Apr 14 21:37:38 now if you find an idoneous application that involves a BBB all the better. Apr 14 21:38:02 I found an armhf thing but it was for another board. Boo! Apr 14 21:40:54 https://github.com/lhelontra/tensorflow-on-arm is what I found but I have not been able to make it work at all. Apr 14 21:43:34 https://github.com/lhelontra/tensorflow-on-arm/blob/master/build_tensorflow/configs/beagle_black.conf <<< I will try this one. Apr 14 22:45:20 found export of 3d model in KiCAD check now one step closer to cape-ness Apr 14 23:03:37 GenTooMan: I am just goofing off installing packages. Would you like some support? Apr 14 23:08:22 where are the overlay files stored Apr 14 23:12:48 On github. Apr 14 23:12:58 Or...do you mean on the BBB? Apr 15 00:13:25 Mattb0ne: the compiled bb.org overlays are stored in /lib/firmware, which is also the required location for overlays used for cape auto-detection. Custom overlays can technically be placed anywhere you want since you specify the full path in /boot/uEnv.txt Apr 15 02:28:25 can I just modify an existing overlay **** ENDING LOGGING AT Wed Apr 15 02:59:57 2020