Category: Electrical Engineering

Combining Two Arduino Code Files

PLEASE LOOK AT THE ASSIGNMENT PDF & THE CODE FILES I ATTACHED TO GET MORE CLEAR INSTRUCTIONS:

I have two arduino code files that need to be combined. One is a code file that contains the code to an algorithm that detects when two objects are going to crash into each other.

The other Arduino code file is a file that contains a user alert system for the previously mentioned code file. This file contains LED and sound alert code which is very simple.

Goal is to get the collision algorithm to work with the LED’s and with the sound all at the same time.

I HAVE ATTACHED BOTH OF THE CODE FILES. THE ASSIGNMENT IS TO COMBINE THEM AND GET THE CODE WORKING TOGETHER.

                                                                                                       

Object detection and coordinate of object

We have Raspberry Pi 4 and its camera, uArm Swift Pro

Image processing: detect multiple leaves by OpenCV( better if available), generate coordinates. uArm movement to tap on leaves.

GUI for control

database of measured leaves size.

price negotiable!!!!!

WeightedGraph

implement a weighted graph in C++ . Both undirected and directed graphs must be supported. The public part of the class definition is given to you in WeightedGraph.h. Make whatever changes you need there, and implement functions in WeightedGraph.cpp.

This is not an abstract class. You are not expected to create separate Sparse and Dense implementations — just pick one (sparse!) and implement it directly in this class. New functions that are not in the other Graph class:

edgeWeight: Looks for an edge between v1 and v2 and returns the weight. If there’s no edge, then INT_MAX must be returned.

isPath: Returns a pair instead of just a bool. The first value in the pair is true or false, and the second value is the total weight of the path. If it’s not a path, the weight value is undefined (which means you can return anything).

hasCycle: For an undirected graph, this always returns true. For a directed graph, returns true if there is a cycle and false if not.

shortestPath: Returns the shortest path between two vertices. The return value is a vector of integers. If there is no path, the vector must be empty.

Please implement the CPP class for the following one.

WeightedGraph.h

#ifndef WeightedGraph_h

#define WeightedGraph_h

// this is not an abstract class — must implement all member functions

// recommend using adjacency list representation, but not required

class WeightedGraph {

public:

WeightedGraph(size_t numNodes, bool isDirected = false);

~WeightedGraph();

int size() const; // return number of nodes

bool isDirected() const;

void addEdge(int v1, int v2, int weight);

bool isEdge(int v1, int v2) const;

int edgeWeight(int v1, int v2) const; // returns INT_MAX if no edge

std::list<int> getAdjacencyList(int v) const; // returns list of nodes adjacent to v

bool hasCycle() const; // returns true if there is a cycle, false if no cycles

 

// isPath returns pair: first value is true if path, false if not

// second value is weight (of entire path), undefined if not a path

std::pair<bool,int> isPath(const std::vector<int>& ) const;

// shortestPath returns empty path if there is no path,

// or if there is any negative weight (assumes Dijkstra algorithm)

std::vector<int> shortestPath(int from, int to) const;

private:

//TBD

};

#endif

Fuzzy Logic Presentation

Create a Powerpoint presentation with the work provided and/or outside work. Also, I need a separate word document on what to say on each slide. I have a video of other presentations. The presentation has to be 5 minutes. I have research paper and other stuff included. Also, have the presentation centered about fuzzy logic and not all the medical stuff. Let me know if more info is needed.

LogixPro

ELC 128

Programmable Logic controllers

Bit Shift Register

LAB #23

NAME ___________

Use I/O simulation in Logixpro to simulate the following process.

There are 16 outputs that we are controlling. O:2/0 O:2/15

Program in a shift register that clocks every 3 seconds. Three seconds is the amount of time that part stays in each station. Use proximity switch to indicate if the part is present.(I:1/0)

The data from the proximity sensor will be shifted to the left through O:2.0 every three seconds.

Hint: If proximity sensor is on, O:2/0 comes on first, three seconds later O:2/1 comes on if the sensor stays on.

LogixPro

Use I/O simulation in Logixpro to simulate the following process.

The preset value of a timer (T4:0.PRE) can be changed by pressing and releasing 5 assigned PBNO switches (I:1/0, I:1/1,.). The five preset values are 10s, 20s, 30s, 40s, and 50s.

Hint: First move 5 Timer preset values to N7:0 through N7:4

N7:0 =100

N7:1 = 200

N7:2 =300

N7:3 =400

N7:4 =500

Second, use the switches to move the integers to T4:0.PRE (pressing a switch triggers the move)

Example. Pressing and releasing I:0/0 will change the preset value to 100

Python Simulation of an Internet Router

develop a discrete-event simulation of an Internet router
with a single input queue and a single output interface. The packets arrive following a random Poisson
process, with a pre-defined average time between two arriving packets. The Poisson process is
characterized with an exponential distribution of inter-arrival times. The packets have random sizes
the packet size should be calculated by the simulator at the packet arrival. The packet size should be
considered a random variable with exponential distribution. In the case the packet has arrived and
cannot be immediately served, it has to wait for the first available opportunity to be served. The packet
size determines the service time duration.

Use MATLAB to solve the question

I need you to use MATLAB application and write a report for me. please add comments as well on the codes also add the output that are obtained from the codes in the report and explain, please do question 3 only!!

Do not copy and paste from Google, please

Modulation at the transmitter

Consider the voice signal m(t), provided in the form of the sampled, discrete-time signal vector m[n]. The sampling frequency used to obtain m[n] from m(t) is Fs=320kHz and the digital encoding rate is K=8 bits/sample. You can load m[n], Fs, and K with the command: load VOICE. Denote by N be the length of m[n].

Dynamic Memory

This assignment will re-implement the social network database(can be provided) with dynamic memory and saving into files. Heres the specification for the application:
a) User entries should be kept in a linked (ordered alphabetically by name) list with memory allocated when a new student is introduced by the user. Memory should be deallocated when a user is removed. Storage of user’s friends can still be kept in arrays
b) The Menu presented to the user should be:
      1) Introduce  user
      2) Introduce relationship/friendship
      3) Remove user
      4) Print user information
      5) Print report for all users (all information)
      6) Save to file
      7) Retrieve data from file
      8) Exit
c) Your code should contain a insert and remove function. Ideally these will receive a pointer to pointer to the head of the list (but you can keep the head of the list as a global variable)
d) You should also implement a version of insert and remove functions that use balanced binary trees. This will be worth 20% of you final mark. The user should be able to choose the data structure directly from the command line when it starts the program. This should use the argc/argv arguments to main()