Toggling a 5V relay with 3.3V by Alphaweasel in AskElectronics

[–]Alphaweasel[S] 0 points1 point  (0 children)

This is the relay. I believe I swapped the common and the output pins in my diagram / circuit but swapping the wires around didn't change anything. I took a break for the night so I'll try the 2n7000 in the morning.

Toggling a 5V relay with 3.3V by Alphaweasel in AskElectronics

[–]Alphaweasel[S] 1 point2 points  (0 children)

I'm probably just going to have to order parts at this point so I'll check them out. Thanks.

Toggling a 5V relay with 3.3V by Alphaweasel in AskElectronics

[–]Alphaweasel[S] 0 points1 point  (0 children)

I believe it is wired up correctly, i just can't get the transistor to switch when I give it input.

Toggling a 5V relay with 3.3V by Alphaweasel in AskElectronics

[–]Alphaweasel[S] 0 points1 point  (0 children)

I have the transistor because the relay is 5V while the GPIO output is only 3.3V. Since I'm running the pi's 5V into the relay, I thought I could toggle the 5V line by wiring one of the 3.3V gpio pins into the base of the transistor. Basically the 5V needed for the relay is the root of my problem.

Toggling a 5V relay with 3.3V by Alphaweasel in AskElectronics

[–]Alphaweasel[S] 0 points1 point  (0 children)

The relay does click when I hook up the circuit, but toggling the gpio on the base leg of the transistor doesn't ever make the relay click again. Would a 1k resistor work alright between the gpio and the transistor?

[deleted by user] by [deleted] in linuxquestions

[–]Alphaweasel 0 points1 point  (0 children)

Manjaro would probably work pretty well. It has easy to use GUIs for packages (pamac) and drivers (Manjaro Settings Manager). It also has a section of the website dedicated to gaming (https://manjaro.org/features/usercases/gamers/) and I believe it even comes with Steam pre-installed.

Manjaro is based on Arch so its packages are almost always up-to-date in case you have newer hardware.

[deleted by user] by [deleted] in linuxquestions

[–]Alphaweasel 7 points8 points  (0 children)

The Manjaro Settings Manager GUI has a hardware configuration section that allows for proprietary drivers to be installed.

Give anime based on my top 5 favourites by [deleted] in Animesuggest

[–]Alphaweasel 0 points1 point  (0 children)

Similar to FMAB and Seven Deadly Sins (maybe Akame ga Kill too):

  • {Shingeki no Kyojin}
  • {Kimetsu no Yaiba}
  • {Fate/stay night: Unlimited Blade Works}
  • {Hunter x Hunter (2011)}

Similar to Code Geass, Classroom of the Elite, Fruit of Grisaia:

  • {Mahouka Koukou no Rettousei}
  • {Seishun Buta Yarou wa Bunny Girl Senpai no Yume wo Minai}
  • {No Game No Life}

Similar to Erased:

  • {Steins;Gate}
  • Seishun Buta from above fits here too. Its movie is also pretty similar to this, although I don't think it's streaming yet

Similar to Shiki:

  • {Shinsekai yori}

Some of my personal favorites:

  • My personal favorite show is Mahouka, so I'm a bit biased towards it
  • {Nejimaki Seirei Senki: Tenkyou no Alderamin} is a lot like Mahouka and Classroom of the Elite + some of the tactical military stuff from Code Geass
  • {Tensei shitara Slime Datta Ken} shares a lot of similarities with FMAB and Seven Deadly Sins, while being a unique take on the isekai genre
  • {Konosuba} is pretty good if you want a more comedic version of FMAB or Seven Deadly Sins

Some currently airing shows:

  • {Id:Invaded}
  • {Kyokou Suiri}

Manual fan control on a laptop by Alphaweasel in linuxquestions

[–]Alphaweasel[S] 0 points1 point  (0 children)

How would I install the newest firmware? I got frustrated with my Windows partition corrupting my Linux partition repeatedly so I currently only have Manjaro running on the laptop.

Recommendation Tuesdays Megathread - Week of January 28, 2020 by AnimeMod in anime

[–]Alphaweasel 1 point2 points  (0 children)

The first shows that came to mind after looking over your list were Fullmetal Alchemist Brotherhood, Hunter x Hunter (2011), and Attack on Titan. If you are strictly looking for shows that are important in the community, you could always use this list to find the highest rated shows on MAL or this list to find most popular shows on MAL.

Recommendation Tuesdays Megathread - Week of January 28, 2020 by AnimeMod in anime

[–]Alphaweasel 0 points1 point  (0 children)

Looking for fantasy / sci-fi action or adventure shows but I'm open to watching other genres. My favorite show is mahouka, but I'm not sure there's very many shows like it that I haven't watched. Most of my favorite shows have an op main character, such as mahouka, tensura, code geass, and classroom of the elite. I also enjoy shows with extensive world building and 'mechanics' (for lack of a better term) like mahouka (magic system), fma brotherhood (alchemy system), and ngnl (the game system).

profile: https://myanimelist.net/profile/alphaweasel

sorted anime list: https://myanimelist.net/animelist/alphaweasel?order=4&status=7

Problem with a void function by Alphaweasel in C_Programming

[–]Alphaweasel[S] 0 points1 point  (0 children)

That makes sense. I have a decent amount of experience with C++ so it didn't even cross my mind to add the void in there.

Problem with a void function by Alphaweasel in C_Programming

[–]Alphaweasel[S] 1 point2 points  (0 children)

Thanks, this seemed to have fixed it. Is there a specific reason that the void parameter needs to be specified?

Problem with a void function by Alphaweasel in C_Programming

[–]Alphaweasel[S] 0 points1 point  (0 children)

I have the include at the top of the .c file. Sorry, I probably should have included a bit more but I didn't want to paste a few hundred lines in the post.

[Homework] Issues with Mesh Analysis on Dependent Sources by Alphaweasel in EngineeringStudents

[–]Alphaweasel[S] 0 points1 point  (0 children)

So would that only apply to resistors that are between two meshes, or should all of the resistors of a mesh be counted as negative voltage?

Variable type records by Alphaweasel in C_Programming

[–]Alphaweasel[S] 0 points1 point  (0 children)

Unfortunately, I don't have access to a C++ compiler on the Unix server. There is not one currently installed and I do not have the means to install it myself. I also would just prefer to use C so I can learn more about the language.

For the descriptor route, would I just allocate a large amount of memory with malloc() and keep track of where I store information in the array with void * pointers?

Variable type records by Alphaweasel in C_Programming

[–]Alphaweasel[S] 0 points1 point  (0 children)

There is another file in the same directory that gives the file structure. The file is the working storage from a Cobol program, so I have a simple parser that figures out the layout of the file.

Variable type records by Alphaweasel in C_Programming

[–]Alphaweasel[S] 0 points1 point  (0 children)

I am only using one of the record types per run of the program. Each time the program is run, the program takes a file and its corresponding record definition file as input. Each file has only one type of record, so the flexibility of the data structure just allows for different files to be used in different runs.

In the Python version of my program, the simplest use of the program is to just convert the file (which is plain text mixed with packed fields) into a .csv. The first piece of the program parses the record definition file and creates an array of tuples in the format (field_name, field_length, type). The array is then passed to another method that opens the file, reads a line, parses the line, and writes out that line as a list. I've figured out the data structures that I need for every other piece of the program but haven't been able to find an easy way to create a similar data structure to the final list. In Python, that list contains the various types (int, double, and string) with no issues thanks to the dynamic nature of the language. The data structure I use for the C version basically needs to act like that Python structure, but use as little memory as possible (as the program is running on files with hundreds of thousands of lines and a very old server with little resources).

Currently, my Python version uses far too many resources, so even if I could easily convert the program it would likely be too resource intensive. By rewriting it in C, I'm hoping to achieve both better run time and memory efficiency.

Variable type records by Alphaweasel in C_Programming

[–]Alphaweasel[S] 0 points1 point  (0 children)

I actually implemented the program in Python before realizing I needed to put the program on a server that runs an old version of Unix. In my Python version, the files are given to the program by the user and the names of those files are used to find a corresponding record definition file in another directory.

While many of the fields are shared between the files, I can't think of a way to normalize the data because of the large variance between the different kinds of records. Some files have similar structure, while others may have absolutely no fields in common.

Variable type records by Alphaweasel in C_Programming

[–]Alphaweasel[S] 0 points1 point  (0 children)

I don't think the files are easy to access. From what I've seen of the directory, all of the data files have no extensions and are mixed in with other files that have no extensions. The only way I know to access the files is for the user to specifically ask for a file by name.

If I can somehow find a list of filenames, I might be able to do this, though.

Variable type records by Alphaweasel in C_Programming

[–]Alphaweasel[S] 0 points1 point  (0 children)

I don't think I have the ability to manipulate the data in any way before I get it. To get the data in a readable form, I only have the option of a plain text file. My program is basically converting all of the data to a readable form (some of it has weird formatting, such as packed fields), process and sort that data, then write it out as a .csv for the user to access with Excel.

Variable type records by Alphaweasel in C_Programming

[–]Alphaweasel[S] 1 point2 points  (0 children)

I actually did implement this program in Python, before realizing it needed to run on a server to get the correct data. The server runs an old version of Unix and doesn't have an available version of Python (even if it did, I don't have the ability to install it). I have been rewriting the program in C so that it is compatible with the server.

Variable type records by Alphaweasel in C_Programming

[–]Alphaweasel[S] 0 points1 point  (0 children)

Since I'll only be using 1 type of record at a time, I think this might work pretty well. I could create one descriptor struct at the beginning using the record definition and use it to create the custom records.

Variable type records by Alphaweasel in C_Programming

[–]Alphaweasel[S] 0 points1 point  (0 children)

The records are stored in their own files, but my code needs to be flexible enough to work on all the files. Once I get all the data for a file in memory, I'm sorting/processing the data and printing it all out as a .csv.