Hi @capslck, welcome to the forum!
I’ve done this kind of calculation in this comment, as part of my StaROV project. The same logic applies here - you’ll need the mass of the Arduinos and Raspberry Pi you’re considering, along with the mass of the tube and end caps of the enclosure you’re wanting to use. You haven’t specified which boards you’re using (both Arduinos and Raspberry Pis are available in multiple form factors), or the enclosure material or length, or the end caps, so that’s not something I can help with without further information.
Once you have the mass of the parts you can compare it to the volume displaced by the enclosure, and determine whether it would float in waters of different densities. I’d recommend you try to work through the calculation here (see the Formatting a Post/Comment section of the How to Use the Forums post for formatting help) - I’m happy to help if you get stuck, or if you can’t find a particular piece of information